source: node_modules/d3-color/src/define.js

Last change on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 340 bytes
Line 
1export default function(constructor, factory, prototype) {
2 constructor.prototype = factory.prototype = prototype;
3 prototype.constructor = constructor;
4}
5
6export function extend(parent, definition) {
7 var prototype = Object.create(parent.prototype);
8 for (var key in definition) prototype[key] = definition[key];
9 return prototype;
10}
Note: See TracBrowser for help on using the repository browser.