Sha256: f7d16c0375c02479b1f14b1f5f361b465e136ef2a796511c588b31b9c968453d

Contents?: true

Size: 510 Bytes

Versions: 1515

Compression:

Stored size: 510 Bytes

Contents

var inherits = require('./inherits.js')
var assert = require('assert')

function test(c) {
  assert(c.constructor === Child)
  assert(c.constructor.super_ === Parent)
  assert(Object.getPrototypeOf(c) === Child.prototype)
  assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
  assert(c instanceof Child)
  assert(c instanceof Parent)
}

function Child() {
  Parent.call(this)
  test(this)
}

function Parent() {}

inherits(Child, Parent)

var c = new Child
test(c)

console.log('ok')

Version data entries

1,515 entries across 301 versions & 39 rubygems

Version Path
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/glob/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/fstream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/tar-fs/node_modules/tar-stream/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/nested-error-stacks/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/decompress-zip/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/read-all-stream/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/fstream-ignore/node_modules/inherits/test.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/nested-error-stacks/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/read-all-stream/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/fstream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/fstream-ignore/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/tar-fs/node_modules/tar-stream/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/decompress-zip/node_modules/readable-stream/node_modules/inherits/test.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/glob/node_modules/inherits/test.js