diff options
Diffstat (limited to 'cli/rt')
-rw-r--r-- | cli/rt/01_web_util.js | 38 | ||||
-rw-r--r-- | cli/rt/02_console.js | 14 | ||||
-rw-r--r-- | cli/rt/06_util.js | 5 |
3 files changed, 10 insertions, 47 deletions
diff --git a/cli/rt/01_web_util.js b/cli/rt/01_web_util.js index ee8992eb2..4a3df65ce 100644 --- a/cli/rt/01_web_util.js +++ b/cli/rt/01_web_util.js @@ -3,10 +3,6 @@ ((window) => { const illegalConstructorKey = Symbol("illegalConstructorKey"); - function isInvalidDate(x) { - return isNaN(x.getTime()); - } - function requiredArguments( name, length, @@ -20,25 +16,6 @@ } } - function immutableDefine( - o, - p, - value, - ) { - Object.defineProperty(o, p, { - value, - configurable: false, - writable: false, - }); - } - - function hasOwnProperty(obj, v) { - if (obj == null) { - return false; - } - return Object.prototype.hasOwnProperty.call(obj, v); - } - const objectCloneMemo = new WeakMap(); function cloneArrayBuffer( @@ -136,24 +113,9 @@ } } - /** A helper function which ensures accessors are enumerable, as they normally - * are not. */ - function defineEnumerableProps( - Ctor, - props, - ) { - for (const prop of props) { - Reflect.defineProperty(Ctor.prototype, prop, { enumerable: true }); - } - } - window.__bootstrap.webUtil = { illegalConstructorKey, - isInvalidDate, requiredArguments, - immutableDefine, - hasOwnProperty, cloneValue, - defineEnumerableProps, }; })(this); diff --git a/cli/rt/02_console.js b/cli/rt/02_console.js index ab91ffc09..43638efed 100644 --- a/cli/rt/02_console.js +++ b/cli/rt/02_console.js @@ -14,10 +14,16 @@ bold, } = window.__bootstrap.colors; - const { - isInvalidDate, - hasOwnProperty, - } = window.__bootstrap.webUtil; + function isInvalidDate(x) { + return isNaN(x.getTime()); + } + + function hasOwnProperty(obj, v) { + if (obj == null) { + return false; + } + return Object.prototype.hasOwnProperty.call(obj, v); + } // Copyright Joyent, Inc. and other Node contributors. MIT license. // Forked from Node's lib/internal/cli_table.js diff --git a/cli/rt/06_util.js b/cli/rt/06_util.js index 011fa6de5..f4804c519 100644 --- a/cli/rt/06_util.js +++ b/cli/rt/06_util.js @@ -46,10 +46,6 @@ return promise; } - function notImplemented() { - throw new Error("not implemented"); - } - function immutableDefine( o, p, @@ -139,7 +135,6 @@ window.__bootstrap.util = { log, setLogDebug, - notImplemented, createResolvable, assert, AssertionError, |