htc 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
..
.github 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
test 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
.eslintrc 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
.nycrc 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
CHANGELOG.md 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
LICENSE 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
Object.setPrototypeOf.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
Object.setPrototypeOf.js 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
README.md 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
Reflect.setPrototypeOf.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
Reflect.setPrototypeOf.js 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
index.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
index.js 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
package.json 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses
tsconfig.json 7ca38fdcbb 善行少年PC端首次提交(基础版) hai 10 meses

README.md

set-proto Version Badge

github actions coverage License Downloads

npm badge

Robustly set the [[Prototype]] of an object. Uses the best available method.

Getting started

npm install --save set-proto

Usage/Examples

const assert = require('assert');
const setProto = require('set-proto');

const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };
const b = { c: 3 };

assert.ok(!('c' in a));

setProto(a, b);

assert.ok('c' in a);

Tests

Clone the repo, npm install, and run npm test