{"_id":"classkit","_rev":"25-6b654a25df1c397745be34df0f0bb63b","name":"classkit","description":"class-like inheritance if you're into that sort of thing","dist-tags":{"latest":"2.1.1"},"versions":{"0.0.1":{"name":"classkit","version":"0.0.1","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"_id":"classkit@0.0.1","dist":{"shasum":"6b30a62b8bca4ad4aeb1e97ed37667aa70f4c60f","tarball":"https://registry.npmjs.org/classkit/-/classkit-0.0.1.tgz","integrity":"sha512-JZVtwp+kbW4xejzSktI2pTLcJ4dytpphP2SAa5quNQwV/SV06NOI0JZfXHU7/A9Dzf2hf1J7XQkyMixAKmm4cA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxlnbWMH3ZoOjKcjNFWlWZk6Y5xsPNc3IwrwaFk2W7vgIgH0m3ebeywba35wrbctFs2xcvVMWhnLVlYBYqKaebkGE="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"directories":{}},"0.0.2":{"name":"classkit","version":"0.0.2","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"_id":"classkit@0.0.2","dist":{"shasum":"ac829eb5a19a184aeb07e1e0b555e4392a65c2a0","tarball":"https://registry.npmjs.org/classkit/-/classkit-0.0.2.tgz","integrity":"sha512-0kDEBwnn/emphBUmHHBGPmFHKKKSn5xQqBNmQcnCOG8vlEacpU4x2ZEreXOOSXLnra6O+REqILdtdVoriSegAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCo7yoF0s/S2o2n28zsz2J9Pzw/WPxYCzeSbsVLhqlR+AIgUlUTWB34ejl2/w1ISSFDsRqbQQY57+8+otn1e/IAg5M="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"directories":{}},"0.1.0":{"name":"classkit","version":"0.1.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"_id":"classkit@0.1.0","dist":{"shasum":"83d7e83b77ebc24af7be830a1a19e4344d1b8f62","tarball":"https://registry.npmjs.org/classkit/-/classkit-0.1.0.tgz","integrity":"sha512-mUZPRANl4DelY9EazJ/rAqU80rfgCUNS13HoJvbih9V8hOfuKf+wuAghEAzSWCxsYDiZHs0S0kdf9pLm88TCbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNe50NtfVAovOzcpihaJeJd/TAiGuF/wkJpNOfilO4EQIgXjI00H/sI94Cpo4KfY72p4uI3Xt167J2RjkS8rLNGHQ="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"directories":{}},"0.1.1":{"name":"classkit","version":"0.1.1","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@0.1.1","dist":{"shasum":"60e8654d87413828c9ebf8820dd215f3b09ab94d","tarball":"https://registry.npmjs.org/classkit/-/classkit-0.1.1.tgz","integrity":"sha512-k8FTfNHEOZEizmAx1bSUEPdKpQ73RfjDWpvDdYA2Q+Wp4zNMfGtCc9gJpSXsGB9lD2nI+XzchJlMSwbcBX9bKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFUOqGWALybnJ3LOoFlblrzZO9KxJmAg7i5dvyWS4kBAiA1VO9cGjNKrauPNfvuBIIRX54MGqA6diH/IMo4RuvDxQ=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}]},"0.2.0":{"name":"classkit","version":"0.2.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@0.2.0","dist":{"shasum":"df07b71aea94f77145b6946684812a83ffac6234","tarball":"https://registry.npmjs.org/classkit/-/classkit-0.2.0.tgz","integrity":"sha512-6j59OxgNxBsEAEJILr3R6qJ4Zk0T/UNfkjPIrRn/6hWvjcUdRMbChxhL3BwC4mMW5TJWUtGTsJhXchfFDZtBag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxyAwwfPojqEKpwzcbjKkYkoJ2UsjQDdRNZ0Sr7KoDzAiEAzLm7eD2ZGM+4RIRs/8EJ9cV7iC4MSY/gr//I5UZsOd8="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}]},"1.0.0":{"name":"classkit","version":"1.0.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"4f1aec51d794012c526679879ceebc314bfef64d","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@1.0.0","_shasum":"1d6ad6f211426e0164c3de7f9f500920afe30e99","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"1d6ad6f211426e0164c3de7f9f500920afe30e99","tarball":"https://registry.npmjs.org/classkit/-/classkit-1.0.0.tgz","integrity":"sha512-5jpVfqHhTSYcPnNs0JLhf02BiUfGexrgdRqrgdOeyKCTkAyTzozRMNvpDdUiRx7USyhSkWV7p+gihq/WyRxH6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr6HKxldaYOFbCNDhNU5CTUSl/uGwxw5q2wX8sVA4M3wIgL1T43VmEoJG5D9i1Ed11QN56/TFP0BRGK+pSd7mJ0Oc="}]}},"1.0.1":{"name":"classkit","version":"1.0.1","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"8e96fc6248bdf677a0e5abbeb0382a8a4b2e6bb0","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@1.0.1","_shasum":"ae65d5e8970a7255484b978d3559078e65237dc1","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"ae65d5e8970a7255484b978d3559078e65237dc1","tarball":"https://registry.npmjs.org/classkit/-/classkit-1.0.1.tgz","integrity":"sha512-t8gE0tNaUpohiCKfN4+ch61MRDEZBMlWpaP3vNFU3aTlyR4I/wjj5ukr5sm8R7+P7G2MOjAgMoOHErBl/IO1CA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7WtBg42JeqbHcqmg9XrJxmbW3/f4SaZZmcHof/oA3JQIhAJ8WevWvRLTCQkFzcc5CAIznHW/iC3EqKQ2gBqwQnGLC"}]}},"1.0.2":{"name":"classkit","version":"1.0.2","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"fa9c0f0a07f03e2e0db7cb270cecafa116834798","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@1.0.2","_shasum":"3fa980e708a351ea70ef387cbdde1414c044c577","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"3fa980e708a351ea70ef387cbdde1414c044c577","tarball":"https://registry.npmjs.org/classkit/-/classkit-1.0.2.tgz","integrity":"sha512-vJgmCPHcbx+ScDllZsomLCzHe4nQzalkK/x73QBmIoejJ+jRtzXhzg2AwpFRs1bXppLfINCD8Vr1l+PtT6RveA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVv2kaKJp0MRlhCV1DTbiJ3cXoUuqmlyVcA/Y93RI8SwIgMjcLuojw8iprmlvvyY6dbVIC5vrqw/hFbUVHA9V0kaE="}]}},"1.1.0":{"name":"classkit","version":"1.1.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"1a1176255447874c2d82c4c5fd542ef671e17731","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@1.1.0","_shasum":"2595de36c8ed2777e5a73e0b580b805ebd33b219","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"2595de36c8ed2777e5a73e0b580b805ebd33b219","tarball":"https://registry.npmjs.org/classkit/-/classkit-1.1.0.tgz","integrity":"sha512-d6hpgvgD0g4Ul9Z7qhV7F9mZ69y3b+yASY8VkSnqSwmKuigKAwdr2JKn7NcdXvRYKStTyy9Qnt60PzY1HdruUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF+ydYsLnWhVQHYI77SAQ7uYlw+nKnaLzq0uztZqH94wIhAIHcopf+500/hogfvOHs0BJLli42eZvqEldRE9zNTVbZ"}]}},"1.1.1":{"name":"classkit","version":"1.1.1","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"1d50c3f3809d3981bf3f1109aa9ed5e3a919dc42","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@1.1.1","_shasum":"47281941f883e26682f0574b66102a51321aa8a0","_from":".","_npmVersion":"2.0.0-beta.2","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"47281941f883e26682f0574b66102a51321aa8a0","tarball":"https://registry.npmjs.org/classkit/-/classkit-1.1.1.tgz","integrity":"sha512-iH4O+t/U2AYXDX8EbEJ3IhY2te31kk7a5SSg0xFg++qEiHC7lk/RwdotG7aAx/oBF99EIL6i68PXhZURu6QDNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGu9cVuizBm9CiP/5GJUw4tfby67QhxNT3Sj0SwIeGj+AiAXyW5Dc/D/rSHHxwo7czDh578CeDFX52LcNPyqiwnteg=="}]}},"2.0.0":{"name":"classkit","version":"2.0.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"6b92ff652253a2ade3c93a7f641b55502423d323","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@2.0.0","_shasum":"785c00d76f3212172654787f7776ee48fb642734","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.35","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"785c00d76f3212172654787f7776ee48fb642734","tarball":"https://registry.npmjs.org/classkit/-/classkit-2.0.0.tgz","integrity":"sha512-qKogCcYmvG6y+Bkwz7bCBWzzlwwBrn2Ttcon2N97S5JMyOiql13RCe1uCVXBJxBbSyMvsgKD1ektPnQk5dObtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0zA1X68zGFZ2iDafBWlKrXZOK+hmlCI2W2BZLQhtgWAiA1YN6Y8p1cfqTklfElZ9tWfvxMBTLDzHQT39sJNaIXBw=="}]}},"2.1.0":{"name":"classkit","version":"2.1.0","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"55c24cb691d6ef6360fea31892b9425f03305bc1","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit","_id":"classkit@2.1.0","_shasum":"a2201249de24938edb2c5f92a4ff6c71c76be344","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.35","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"a2201249de24938edb2c5f92a4ff6c71c76be344","tarball":"https://registry.npmjs.org/classkit/-/classkit-2.1.0.tgz","integrity":"sha512-FIxjktQR/DO1TWNxPc62NfQAYCBiFtd3SUl7Hg09cnmdZYWOTdxsp58+MC+MsPL6GU0z1Vfy3oa6XYpnlZoOkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFm5FCvdR0MwQW1CCYb38RVH7Po6/rKT1WbsMDMrlM/6AiEA9nXwsWgSJ9JetW4uNGYUMATOrxzw2hFHX0g1xF3TDAo="}]}},"2.1.1":{"name":"classkit","version":"2.1.1","description":"class-like inheritance if you're into that sort of thing","main":"index.js","keywords":["class","inheritance"],"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jaz303/classkit.git"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"gitHead":"8f1d03888579a2e3f27cc12e4a0abe956edd2fe7","bugs":{"url":"https://github.com/jaz303/classkit/issues"},"homepage":"https://github.com/jaz303/classkit#readme","_id":"classkit@2.1.1","_shasum":"7c7a25dbfd1cea12698ecbabbc440d2559cb1121","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"jaz303","email":"jason@onehackoranother.com"},"maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"dist":{"shasum":"7c7a25dbfd1cea12698ecbabbc440d2559cb1121","tarball":"https://registry.npmjs.org/classkit/-/classkit-2.1.1.tgz","integrity":"sha512-DveVYvX8vpNItI3HgO5QYhRA6BrY9tKzT1at2z/IlaDLjv65AL0IDR2D9mkWHpkBp/N8NL1cd4HaUgAbNYWITw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwBSzeVJzoT3rfDX76sD1Fcocm7dmMTKYD8iH2qrmkdgIgZN833Eb3YUnC9jEO6SCwvRlvh7tErkucJ3uPBVbATXs="}]}}},"readme":"# classkit\n\nHow I make classes. Sometimes.\n\nCall `Class.extend`, passing a callback function that returns a class descriptor, an array whose first element is the class constructor and whose successive values are interpreted as pairs of feature names/parameters.\n\n## Simple Usage\n\n    var Person = Class.extend(function() {\n\n      return [\n\n        // this is the Person constructor\n        function(name) {\n          this.name = name;\n        },\n      \n        // instance methods feature + method dictionary\n        'methods', {\n          greet: function() {\n            return \"I am \" + this.name;\n          }\n        }\n      \n      ];\n\n    });\n\n    // when extending classes, super prototype is passed\n    // to callback function for capture by closure.\n    var RudePerson = Person.extend(function(_super) {\n\n      return [\n\n        function(name) {\n          _super.constructor.apply(this, arguments);\n        },\n\n        'methods', {\n          greet: function() {\n            return \"GET OUT OF MY WAY, \" + _super.greet.call(this).toUpperCase();\n          }\n        }\n\n      ];\n\n    });\n\n    console.log((new Person('Jason')).greet());\n    console.log((new RudePerson('Bob')).greet());\n\n## Delegation\n\nUsing the `delegate` feature, classes can automatically generate methods that delegate their behaviour to some other class property.\n\nSee:\n\n```javascript\nClass.extend(function() {\n  return [\n    \n    function() {\n      this.events = new EventEmitter();\n    },\n    \n    'delegate', {\n      \n      // 'foo.on' forwards to 'foo.events.on'\n      'on': 'events',\n\n      // 'foo.emit' forwards to 'foo.events.emit'\n      'emit': 'events'\n\n      // 'foo.onceOnly' forwards to 'foo.events.one'\n      'onceOnly': ['events', 'one']\n\n    }\n\n  ];\n});\n```\n\n## Hooks\n\nHooks can be used to define methods that, when called, will automatically forward to all hooks sharing the same name, all the way down the inheritance tree. Hooks defined in ancestor classes are called first.\n\n```javascript\nA = Class.extend(function() {\n  return [\n\n    function() {},\n\n    'hooks', {\n      componentWillMount: function() {\n        console.log(\"A::componentWillMount\");\n      }\n    }\n\n  ]\n});\n\nB = A.extend(function() {\n  return [\n\n    function() {},\n\n    'hooks', {\n      componentWillMount: function() {\n        console.log(\"B::componentWillMount\");\n      }\n    }\n\n  ]\n});\n\nvar b = new B();\nb.componentWillMount();\n// => A::componentWillMount\n//    B::componentWillMount\n```\n\n## Adding Features\n\nSubclasses can define new `Features`. A `Feature` is simply a function that receives the class constructor and some configuration data as parameters and then effects change on the new class' prototype. Here's an example that auto-generates getters and setters:\n\n    var PropertyObject = Class.extend();\n\n    function makeProperty(proto, name, value) {\n      var suffix = name.charAt(0).toUpperCase() + name.substring(1);\n\n      proto['get' + suffix] = function() { return this[name] || value; };\n      proto['set' + suffix] = function(v) { this[name] = v; };\n    }\n\n    // a feature receives the new class' constructor function and\n    // a parameters object which contains configuration data for\n    // the feature\n    PropertyObject.Features.getset = {\n      apply: function(ctor, props) {\n        for (var k in props) {\n          makeProperty(ctor.prototype, k, props[k]);\n        }\n      }\n    };\n\n    var Person = PropertyObject.extend(function() {\n      return [\n        function() {},\n\n        // dictionary of properties for Person class\n        'getset', {\n          name: 'A Nameless One',\n          age: '100'\n        }\n      ];\n    });\n\n    var person = new Person;\n    console.log(person.getName()); // => \"A Nameless One\"\n\n    person.setName(\"Jason\");\n    console.log(person.getName()); // => \"Jason\"\n","maintainers":[{"name":"jaz303","email":"jason@onehackoranother.com"}],"time":{"modified":"2022-06-13T06:06:08.535Z","created":"2013-07-29T16:20:20.156Z","0.0.1":"2013-07-29T16:20:24.535Z","0.0.2":"2013-07-29T16:53:16.434Z","0.1.0":"2013-08-18T08:37:56.278Z","0.1.1":"2014-01-07T00:16:55.753Z","0.2.0":"2014-02-27T01:40:13.715Z","1.0.0":"2014-08-17T22:06:38.967Z","1.0.1":"2014-08-17T23:16:35.142Z","1.0.2":"2014-08-17T23:17:14.318Z","1.1.0":"2014-08-20T12:05:19.825Z","1.1.1":"2014-09-15T09:47:32.614Z","2.0.0":"2015-06-13T22:32:02.920Z","2.1.0":"2015-06-14T11:47:06.281Z","2.1.1":"2015-10-06T10:52:00.275Z"},"author":{"name":"Jason Frame","email":"jason@onehackoranother.com","url":"jasonframe.co.uk"},"repository":{"type":"git","url":"git+https://github.com/jaz303/classkit.git"},"homepage":"https://github.com/jaz303/classkit#readme","keywords":["class","inheritance"],"bugs":{"url":"https://github.com/jaz303/classkit/issues"},"license":"MIT","readmeFilename":"README.md"}