UNPKG

jugglingdb

Version:

Node.js ORM for every database: redis, mysql, mongodb, postgres, sqlite, ...

11 lines (8 loc) 327 B
exports.inherits = function(newClass, baseClass) { Object.keys(baseClass).forEach(classMethod => { newClass[classMethod] = baseClass[classMethod]; }); Object.keys(baseClass.prototype).forEach(instanceMethod => { newClass.prototype[instanceMethod] = baseClass.prototype[instanceMethod]; }); };