ultimatepos/Modules/Communication/node_modules/get-proto
2026-07-10 08:54:10 +03:30
..
.github Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
test Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
.eslintrc Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
.nycrc Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
CHANGELOG.md Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
index.d.ts Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
index.js Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
LICENSE Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
Object.getPrototypeOf.d.ts Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
Object.getPrototypeOf.js Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
package.json Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
README.md Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
Reflect.getPrototypeOf.d.ts Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
Reflect.getPrototypeOf.js Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30
tsconfig.json Sync production UltimatePOS from server 2026-07-10 08:54:10 +03:30

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