Refactoring day1
This commit is contained in:
2
node_modules/inherits/inherits.js
generated
vendored
2
node_modules/inherits/inherits.js
generated
vendored
@@ -1,9 +1,7 @@
|
||||
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');
|
||||
}
|
||||
|
||||
32
node_modules/inherits/inherits_browser.js
generated
vendored
32
node_modules/inherits/inherits_browser.js
generated
vendored
@@ -1,27 +1,23 @@
|
||||
if (typeof Object.create === 'function') {
|
||||
// implementation from standard node.js 'util' module
|
||||
module.exports = function inherits(ctor, superCtor) {
|
||||
if (superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
ctor.prototype = Object.create(superCtor.prototype, {
|
||||
constructor: {
|
||||
value: ctor,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
})
|
||||
}
|
||||
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) {
|
||||
if (superCtor) {
|
||||
ctor.super_ = superCtor
|
||||
var TempCtor = function () {}
|
||||
TempCtor.prototype = superCtor.prototype
|
||||
ctor.prototype = new TempCtor()
|
||||
ctor.prototype.constructor = ctor
|
||||
}
|
||||
ctor.super_ = superCtor
|
||||
var TempCtor = function () {}
|
||||
TempCtor.prototype = superCtor.prototype
|
||||
ctor.prototype = new TempCtor()
|
||||
ctor.prototype.constructor = ctor
|
||||
}
|
||||
}
|
||||
|
||||
12
node_modules/inherits/package.json
generated
vendored
12
node_modules/inherits/package.json
generated
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "inherits",
|
||||
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.3",
|
||||
"keywords": [
|
||||
"inheritance",
|
||||
"class",
|
||||
@@ -17,13 +17,17 @@
|
||||
"repository": "git://github.com/isaacs/inherits",
|
||||
"license": "ISC",
|
||||
"scripts": {
|
||||
"test": "tap"
|
||||
"test": "node test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^14.2.4"
|
||||
"tap": "^7.1.0"
|
||||
},
|
||||
"files": [
|
||||
"inherits.js",
|
||||
"inherits_browser.js"
|
||||
]
|
||||
}
|
||||
|
||||
,"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||
,"_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
,"_from": "inherits@2.0.3"
|
||||
}
|
||||
Reference in New Issue
Block a user