Sha256: ba82e5d8ae3abbce8d6cc2dbd5faefde00d0d9d59c4794a85e942a214056d4ca
Contents?: true
Size: 512 Bytes
Versions: 69
Compression:
Stored size: 512 Bytes
Contents
var createObject = require('./createObject'); /** * Inherit prototype from another Object. * - inspired by Nicholas Zackas <http://nczonline.net> Solution * @param {object} child Child object * @param {object} parent Parent Object */ function inheritPrototype(child, parent){ var p = createObject(parent.prototype); p.constructor = child; child.prototype = p; child.super_ = parent; return p; } module.exports = inheritPrototype;
Version data entries
69 entries across 69 versions & 2 rubygems