FanFarm / system / V3fanfarm-ubuntu-local / V3fanfarm-frontend / node_modules / get-proto /
@Fanfarm User Fanfarm User authored on 12 Sep
..
.github Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
test Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
.eslintrc Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
.nycrc Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
CHANGELOG.md Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
LICENSE Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
Object.getPrototypeOf.d.ts Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
Object.getPrototypeOf.js Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
README.md Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
Reflect.getPrototypeOf.d.ts Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
Reflect.getPrototypeOf.js Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.d.ts Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
index.js Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
package.json Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
tsconfig.json Fix API server issues -Disable Rack::Protection and remove Logger path error 7 months ago
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