wyn e52d21130f 客户端界面第一次提交 před 5 měsíci
..
.github e52d21130f 客户端界面第一次提交 před 5 měsíci
test e52d21130f 客户端界面第一次提交 před 5 měsíci
.eslintrc e52d21130f 客户端界面第一次提交 před 5 měsíci
.nycrc e52d21130f 客户端界面第一次提交 před 5 měsíci
CHANGELOG.md e52d21130f 客户端界面第一次提交 před 5 měsíci
LICENSE e52d21130f 客户端界面第一次提交 před 5 měsíci
Object.getPrototypeOf.d.ts e52d21130f 客户端界面第一次提交 před 5 měsíci
Object.getPrototypeOf.js e52d21130f 客户端界面第一次提交 před 5 měsíci
README.md e52d21130f 客户端界面第一次提交 před 5 měsíci
Reflect.getPrototypeOf.d.ts e52d21130f 客户端界面第一次提交 před 5 měsíci
Reflect.getPrototypeOf.js e52d21130f 客户端界面第一次提交 před 5 měsíci
index.d.ts e52d21130f 客户端界面第一次提交 před 5 měsíci
index.js e52d21130f 客户端界面第一次提交 před 5 měsíci
package.json e52d21130f 客户端界面第一次提交 před 5 měsíci
tsconfig.json e52d21130f 客户端界面第一次提交 před 5 měsíci

README.md

get-proto Version Badge

github actions coverage License Downloads

npm badge

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

Getting started

npm install --save get-proto

Usage/Examples

const assert = require('assert');
const getProto = require('get-proto');

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

assert.equal(getProto(b), a);
assert.equal(getProto(a), Object.prototype);
assert.equal(getProto({ __proto__: null }), null);

Tests

Clone the repo, npm install, and run npm test