202502-Wms-NanTongYaChi/node_modules/setprototypeof
2025-07-18 13:24:53 +08:00
..
test 增加备份记录 2025-07-18 13:24:53 +08:00
index.d.ts 增加备份记录 2025-07-18 13:24:53 +08:00
index.js 增加备份记录 2025-07-18 13:24:53 +08:00
LICENSE 增加备份记录 2025-07-18 13:24:53 +08:00
package.json 增加备份记录 2025-07-18 13:24:53 +08:00
README.md 增加备份记录 2025-07-18 13:24:53 +08:00

Polyfill for Object.setPrototypeOf

NPM Version NPM Downloads js-standard-style

A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.

Usage:

$ npm install --save setprototypeof
var setPrototypeOf = require('setprototypeof')

var obj = {}
setPrototypeOf(obj, {
  foo: function () {
    return 'bar'
  }
})
obj.foo() // bar

TypeScript is also supported:

import setPrototypeOf from 'setprototypeof'