diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-26 15:59:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-26 15:59:24 +0200 |
commit | 18b7109f76a15334a6cd1400b3ac9ee8e21e9171 (patch) | |
tree | 59db967728467e33b97be80ed903172583022153 /cli/rt/02_console.js | |
parent | 98c9798cb757045b3f46573c5baa80e2cfe672aa (diff) |
refactor: prune unneeded JS code (#7689)
Diffstat (limited to 'cli/rt/02_console.js')
-rw-r--r-- | cli/rt/02_console.js | 14 |
1 files changed, 10 insertions, 4 deletions
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 |