![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 3 months ago | - | |
![]() | node_modules/ | 3 months ago | - | |
![]() | tsconfig.json | 40 years ago | 116 | |
![]() | set.js | 40 years ago | 1.2K | |
![]() | set.d.ts | 40 years ago | 144 | |
![]() | package.json | 40 years ago | 2.1K | |
![]() | get.js | 40 years ago | 1.0K | |
![]() | get.d.ts | 40 years ago | 121 | |
![]() | README.md | 40 years ago | 1.9K | |
![]() | LICENSE | 40 years ago | 1.0K | |
![]() | CHANGELOG.md | 40 years ago | 1.5K |
If available, the Object.prototype.__proto__
accessor and mutator, call-bound.
npm install --save dunder-proto
const assert = require('assert');
const getDunder = require('dunder-proto/get');
const setDunder = require('dunder-proto/set');
const obj = {};
assert.equal('toString' in obj, true);
assert.equal(getDunder(obj), Object.prototype);
setDunder(obj, null);
assert.equal('toString' in obj, false);
assert.equal(getDunder(obj), null);
Clone the repo, npm install
, and run npm test