mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-07-12 03:06:05 +09:00
Clean up the oopsie. Rebuild the blank exercises.
This commit is contained in:
+2
@@ -1,7 +1,9 @@
|
||||
try {
|
||||
var util = require('util');
|
||||
/* istanbul ignore next */
|
||||
if (typeof util.inherits !== 'function') throw '';
|
||||
module.exports = util.inherits;
|
||||
} catch (e) {
|
||||
/* istanbul ignore next */
|
||||
module.exports = require('./inherits_browser.js');
|
||||
}
|
||||
|
||||
+18
-14
@@ -1,23 +1,27 @@
|
||||
if (typeof Object.create === 'function') {
|
||||
// implementation from standard node.js 'util' module
|
||||
module.exports = function inherits(ctor, superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
ctor.prototype = Object.create(superCtor.prototype, {
|
||||
constructor: {
|
||||
value: ctor,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
ctor.prototype = Object.create(superCtor.prototype, {
|
||||
constructor: {
|
||||
value: ctor,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
} else {
|
||||
// old school shim for old browsers
|
||||
module.exports = function inherits(ctor, superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
var TempCtor = function () {}
|
||||
TempCtor.prototype = superCtor.prototype
|
||||
ctor.prototype = new TempCtor()
|
||||
ctor.prototype.constructor = ctor
|
||||
if (superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
var TempCtor = function () {}
|
||||
TempCtor.prototype = superCtor.prototype
|
||||
ctor.prototype = new TempCtor()
|
||||
ctor.prototype.constructor = ctor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-16
@@ -1,29 +1,27 @@
|
||||
{
|
||||
"_from": "inherits@^2.0.3",
|
||||
"_id": "inherits@2.0.3",
|
||||
"_from": "inherits@2",
|
||||
"_id": "inherits@2.0.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"_location": "/inherits",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "inherits@^2.0.3",
|
||||
"raw": "inherits@2",
|
||||
"name": "inherits",
|
||||
"escapedName": "inherits",
|
||||
"rawSpec": "^2.0.3",
|
||||
"rawSpec": "2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.3"
|
||||
"fetchSpec": "2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/concat-stream",
|
||||
"/glob",
|
||||
"/readable-stream"
|
||||
"/glob"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
||||
"_spec": "inherits@^2.0.3",
|
||||
"_where": "/Users/cloyd/coderrr/odin/javascript-exercises/node_modules/concat-stream",
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"_shasum": "0fa2c64f932917c3433a0ded55363aae37416b7c",
|
||||
"_spec": "inherits@2",
|
||||
"_where": "/home/michael/projects/javascript-exercises/node_modules/glob",
|
||||
"browser": "./inherits_browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/inherits/issues"
|
||||
@@ -32,7 +30,7 @@
|
||||
"deprecated": false,
|
||||
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
|
||||
"devDependencies": {
|
||||
"tap": "^7.1.0"
|
||||
"tap": "^14.2.4"
|
||||
},
|
||||
"files": [
|
||||
"inherits.js",
|
||||
@@ -57,7 +55,7 @@
|
||||
"url": "git://github.com/isaacs/inherits.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
"test": "tap"
|
||||
},
|
||||
"version": "2.0.3"
|
||||
"version": "2.0.4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user