mmpSearch/assets/js/creations/server/node_modules/get-proto
JotaChina 07562989cf
Deploy / Deploy (push) Successful in 1m16s Details
sync mode on
2025-10-26 16:43:01 -03:00
..
.github sync mode on 2025-10-26 16:43:01 -03:00
test sync mode on 2025-10-26 16:43:01 -03:00
.eslintrc sync mode on 2025-10-26 16:43:01 -03:00
.nycrc sync mode on 2025-10-26 16:43:01 -03:00
CHANGELOG.md sync mode on 2025-10-26 16:43:01 -03:00
LICENSE sync mode on 2025-10-26 16:43:01 -03:00
Object.getPrototypeOf.d.ts sync mode on 2025-10-26 16:43:01 -03:00
Object.getPrototypeOf.js sync mode on 2025-10-26 16:43:01 -03:00
README.md sync mode on 2025-10-26 16:43:01 -03:00
Reflect.getPrototypeOf.d.ts sync mode on 2025-10-26 16:43:01 -03:00
Reflect.getPrototypeOf.js sync mode on 2025-10-26 16:43:01 -03:00
index.d.ts sync mode on 2025-10-26 16:43:01 -03:00
index.js sync mode on 2025-10-26 16:43:01 -03:00
package.json sync mode on 2025-10-26 16:43:01 -03:00
tsconfig.json sync mode on 2025-10-26 16:43:01 -03:00

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