Docker-ImageManagementOptim.../node_modules/get-proto
Syifa bbb8bb07ad Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
..
.github Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
test Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
.eslintrc Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
.nycrc Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
CHANGELOG.md Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
LICENSE Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
Object.getPrototypeOf.d.ts Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
Object.getPrototypeOf.js Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
README.md Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
Reflect.getPrototypeOf.d.ts Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
Reflect.getPrototypeOf.js Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
index.d.ts Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
index.js Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
package.json Image Size Optimization Challenge 2025-08-11 16:51:06 +07:00
tsconfig.json Image Size Optimization Challenge 2025-08-11 16:51:06 +07: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