Buckets:
186 GB
47,027 files
Updated 3 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| test | 1 items | ||
| .eslintrc | 104 Bytes xet | d5f6afc5 | |
| .nycrc | 139 Bytes xet | 4fec1c2b | |
| CHANGELOG.md | 1.05 kB xet | fd2830ce | |
| LICENSE | 1.07 kB xet | 60ec9b3f | |
| Object.getPrototypeOf.d.ts | 125 Bytes xet | dc1915c5 | |
| Object.getPrototypeOf.js | 156 Bytes xet | 2d7195f1 | |
| README.md | 1.79 kB xet | d6014a9a | |
| Reflect.getPrototypeOf.d.ts | 67 Bytes xet | b52c18e5 | |
| Reflect.getPrototypeOf.js | 150 Bytes xet | 01426cf3 | |
| index.d.ts | 126 Bytes xet | dc1c492f | |
| index.js | 821 Bytes xet | 81fb18f6 | |
| package.json | 2.18 kB xet | b524abc0 | |
| tsconfig.json | 118 Bytes xet | 4eb7049f |
get-proto
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
- Total size
- 186 GB
- Files
- 47,027
- Last updated
- May 1
- Pre-warmed CDN
- US EU US EU
