loopback-datasource-juggler/lib/jutil.js

10 lines
343 B
JavaScript
Raw Normal View History

2011-10-10 13:22:51 +00:00
exports.inherits = function (newClass, baseClass) {
Object.keys(baseClass).forEach(function (classMethod) {
newClass[classMethod] = baseClass[classMethod];
});
Object.keys(baseClass.prototype).forEach(function (instanceMethod) {
newClass.prototype[instanceMethod] = baseClass.prototype[instanceMethod];
});
};