This commit is contained in:
2022-09-30 05:39:11 +00:00
parent 41ee9463ae
commit 4687fa49bc
11418 changed files with 1312504 additions and 0 deletions

View File

@ -0,0 +1,3 @@
components
build
node_modules

View File

@ -0,0 +1,5 @@
0.0.2 / 2012-09-03
==================
* fix typo in package.json

16
buildfiles/app/node_modules/component-inherit/Makefile generated vendored Normal file
View File

@ -0,0 +1,16 @@
build: components index.js
@component build
components:
@Component install
clean:
rm -fr build components template.js
test:
@node_modules/.bin/mocha \
--require should \
--reporter spec
.PHONY: clean test

View File

@ -0,0 +1,24 @@
# inherit
Prototype inheritance utility.
## Installation
```
$ component install component/inherit
```
## Example
```js
var inherit = require('inherit');
function Human() {}
function Woman() {}
inherit(Woman, Human);
```
## License
MIT

View File

@ -0,0 +1,10 @@
{
"name": "inherit",
"description": "Prototype inheritance utility",
"version": "0.0.3",
"keywords": ["inherit", "utility"],
"dependencies": {},
"scripts": [
"index.js"
]
}

View File

@ -0,0 +1,7 @@
module.exports = function(a, b){
var fn = function(){};
fn.prototype = b.prototype;
a.prototype = new fn;
a.prototype.constructor = a;
};

View File

@ -0,0 +1,51 @@
{
"_args": [
[
"component-inherit@0.0.3",
"/home/shihaam/www/freezer.shihaam.me/app"
]
],
"_from": "component-inherit@0.0.3",
"_id": "component-inherit@0.0.3",
"_inBundle": false,
"_integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
"_location": "/component-inherit",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "component-inherit@0.0.3",
"name": "component-inherit",
"escapedName": "component-inherit",
"rawSpec": "0.0.3",
"saveSpec": null,
"fetchSpec": "0.0.3"
},
"_requiredBy": [
"/engine.io-client"
],
"_resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
"_spec": "0.0.3",
"_where": "/home/shihaam/www/freezer.shihaam.me/app",
"bugs": {
"url": "https://github.com/component/inherit/issues"
},
"component": {
"scripts": {
"inherit/index.js": "index.js"
}
},
"dependencies": {},
"description": "Prototype inheritance utility",
"homepage": "https://github.com/component/inherit#readme",
"keywords": [
"inherit",
"utility"
],
"name": "component-inherit",
"repository": {
"type": "git",
"url": "git+https://github.com/component/inherit.git"
},
"version": "0.0.3"
}

View File

@ -0,0 +1,21 @@
/**
* Module dependencies.
*/
var inherit = require('..');
describe('inherit(a, b)', function(){
it('should inherit b\'s prototype', function(){
function Loki(){}
function Animal(){}
Animal.prototype.species = 'unknown';
inherit(Loki, Animal);
var loki = new Loki;
loki.species.should.equal('unknown');
loki.constructor.should.equal(Loki);
})
})