diff options
Diffstat (limited to 'deps/npm/node_modules/inherits')
-rw-r--r-- | deps/npm/node_modules/inherits/inherits.js | 8 | ||||
-rw-r--r-- | deps/npm/node_modules/inherits/package.json | 110 | ||||
-rw-r--r-- | deps/npm/node_modules/inherits/test.js | 25 |
3 files changed, 103 insertions, 40 deletions
diff --git a/deps/npm/node_modules/inherits/inherits.js b/deps/npm/node_modules/inherits/inherits.js index 29f5e24f57..3b94763a76 100644 --- a/deps/npm/node_modules/inherits/inherits.js +++ b/deps/npm/node_modules/inherits/inherits.js @@ -1 +1,7 @@ -module.exports = require('util').inherits +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json index 933382a7f4..c68e2f3a35 100644 --- a/deps/npm/node_modules/inherits/package.json +++ b/deps/npm/node_modules/inherits/package.json @@ -1,7 +1,90 @@ { - "name": "inherits", + "_args": [ + [ + { + "raw": "inherits@2.0.3", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2.0.3", + "spec": "2.0.3", + "type": "version" + }, + "/Users/zkat/Documents/code/npm" + ] + ], + "_from": "inherits@2.0.3", + "_id": "inherits@2.0.3", + "_inCache": true, + "_location": "/inherits", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inherits@2.0.3", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "2.0.3", + "spec": "2.0.3", + "type": "version" + }, + "_requiredBy": [ + "#USER", + "/", + "/fstream", + "/fstream-npm", + "/fstream-npm/fstream-ignore", + "/glob", + "/init-package-json/glob", + "/npm-registry-client/concat-stream", + "/npm-registry-client/concat-stream/readable-stream", + "/npm-registry-couchapp/couchapp/nano/follow/request/bl/readable-stream", + "/read-package-json/glob", + "/readable-stream", + "/request/bl/readable-stream", + "/standard/eslint/concat-stream", + "/standard/eslint/concat-stream/readable-stream", + "/standard/eslint/file-entry-cache/flat-cache/del/globby/glob", + "/standard/eslint/glob", + "/tap/tap-mocha-reporter/readable-stream", + "/tap/tap-parser", + "/tar", + "/tar/block-stream" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_shasum": "633c2c83e3da42a502f52466022480f4208261de", + "_shrinkwrap": null, + "_spec": "inherits@2.0.3", + "_where": "/Users/zkat/Documents/code/npm", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", + "devDependencies": { + "tap": "^7.1.0" + }, + "directories": {}, + "dist": { + "shasum": "633c2c83e3da42a502f52466022480f4208261de", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", + "homepage": "https://github.com/isaacs/inherits#readme", "keywords": [ "inheritance", "class", @@ -12,24 +95,23 @@ "browser", "browserify" ], + "license": "ISC", "main": "./inherits.js", - "browser": "./inherits_browser.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/isaacs/inherits.git" }, - "license": "ISC", "scripts": { "test": "node test" }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "_id": "inherits@2.0.1", - "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "_from": "inherits@>=2.0.1 <2.1.0" + "version": "2.0.3" } diff --git a/deps/npm/node_modules/inherits/test.js b/deps/npm/node_modules/inherits/test.js deleted file mode 100644 index fc53012d31..0000000000 --- a/deps/npm/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') |