{"_id":"extendible","_rev":"363666","name":"extendible","description":"Extend constructors using backbone's .extend signature","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"time":{"modified":"2021-07-13T09:00:12.000Z","created":"2014-10-27T15:12:11.479Z","0.1.1":"2015-03-25T11:57:34.941Z","0.1.0":"2014-10-27T15:12:11.479Z"},"users":{},"author":{"name":"Arnout Kazemier"},"repository":{"type":"git","url":"https://github.com/bigpipe/extendible"},"versions":{"0.1.1":{"name":"extendible","version":"0.1.1","description":"Extend constructors using backbone's .extend signature","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"https://github.com/bigpipe/extendible"},"keywords":["backbone","extend","extendable","extendible","extending","extends","inherit","inherits","lodash","constructor","inheritance","mixin","mixins"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/bigpipe/extendible/issues"},"homepage":"https://github.com/bigpipe/extendible","devDependencies":{"assume":"1.2.x","istanbul":"0.3.x","mocha":"2.2.x","pre-commit":"1.0.x"},"gitHead":"4a81c0329396c472055a8ac606dc95b9392a64f2","_id":"extendible@0.1.1","_shasum":"e2a37ed87129fb4f9533e8a8d7506230a539c905","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"e2a37ed87129fb4f9533e8a8d7506230a539c905","size":4207,"noattachment":false,"key":"/extendible/-/extendible-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/extendible/download/extendible-0.1.1.tgz"},"directories":{},"publish_time":1427284654941,"_cnpm_publish_time":1427284654941,"_hasShrinkwrap":false},"0.1.0":{"name":"extendible","version":"0.1.0","description":"Extend constructors using backbone's .extend signature","keywords":["backbone","extend","extendable","extendible","extending","extends","inherit","inherits","lodash","underscore"],"main":"index.js","scripts":{"test":"mocha --reporter spec --ui bdd test.js","watch":"mocha --watch --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"git://github.com/3rd-Eden/extendable.git"},"author":{"name":"Arnout Kazemier"},"license":"MIT","devDependencies":{"assume":"0.0.x","istanbul":"0.3.x","mocha":"2.0.x","pre-commit":"0.0.x"},"gitHead":"7142fad5296f0bde0f0f4d334bd19373870633dd","bugs":{"url":"https://github.com/3rd-Eden/extendable/issues"},"homepage":"https://github.com/3rd-Eden/extendable","_id":"extendible@0.1.0","_shasum":"5acbf7f8f6e1970e88c88a20c6e0cddbb68d57b0","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"5acbf7f8f6e1970e88c88a20c6e0cddbb68d57b0","size":2607,"noattachment":false,"key":"/extendible/-/extendible-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/extendible/download/extendible-0.1.0.tgz"},"directories":{},"publish_time":1414422731479,"_cnpm_publish_time":1414422731479,"_hasShrinkwrap":false}},"readme":"# extendible\n\n[![From bigpipe.io][from]](http://bigpipe.io)[![Version npm][version]](http://browsenpm.org/package/extendible)[![Build Status][build]](https://travis-ci.org/bigpipe/extendible)[![Dependencies][david]](https://david-dm.org/bigpipe/extendible)[![Coverage Status][cover]](https://coveralls.io/r/bigpipe/extendible?branch=master)\n\n[from]: https://img.shields.io/badge/from-bigpipe.io-9d8dff.svg?style=flat-square\n[version]: http://img.shields.io/npm/v/extendible.svg?style=flat-square\n[build]: http://img.shields.io/travis/bigpipe/extendible/master.svg?style=flat-square\n[david]: https://img.shields.io/david/bigpipe/extendible.svg?style=flat-square\n[cover]: http://img.shields.io/coveralls/bigpipe/extendible/master.svg?style=flat-square\n\nExtend your JavaScript constructor in the same way as would extend Backbone.js\nModels using the `extend` method. Extending and inheritance has never been\neasier and more developer friendly. While the original version was straight port\nof the Backbone's source it has been re factored and rewritten many times to the\nproject it is today. It features:\n\n- Backbone compatible `extend` API.\n- Support for EcmaScript 5 getters and setters.\n- Understands the difference between constructors that are created in `use\n  strict` mode.\n\n## Installation\n\nThe module is intended for server-side and browser usage. We use feature\ndetection to ensure compatibility with EcmaScript 3 based environments. The\nmodule is distributed through `npm` and can be installed using:\n\n```\nnpm install --save extendible\n```\n\n## Usage\n\nIn all example code we assume that you've already required the `extendible`\nmodule and saved it as the `extend` variable as shown in the following example:\n\n```js\nvar extend = require('extendible');\n```\n\nThe extend method should be on the constructor as `.extend` method:\n\n```js\nfunction Word() {\n  this.foo = 'bar';\n}\n\n//\n// It should be added on the constructor, not as property on the prototype!\n//\nWord.extend = extend;\n```\n\nTo create a new **Foo** class of your own you call the `Foo.extend` method with\n2 arguments:\n\n1. `Object` properties and methods that should be added to your extended class\n   prototype. These will override existing properties, but it would not override\n   the properties on the parent/root class that you extend on.\n2. `Object` properties and methods that should added on the `constructor`\n   directly. So instead of being introduced on the `.prototype` it's directly\n   added to the returned Function.\n\nAs the properties of the prototype and constructor are inherited from the\nparent/root constructor you can further extended using the same **extend**\nmethod:\n\n```js\nvar Hello = Word.extend({\n  name: 'hello',\n  say: function update() {\n    console.log('the word is: '+ this.name);\n  }\n});\n\nvar World = Hello.extend({\n  name: 'world'\n});\n\nvar world = new World();\nworld.say(); // 'the word is: world'\n```\n\n### License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/bigpipe/extendible","bugs":{"url":"https://github.com/bigpipe/extendible/issues"},"license":"MIT"}