潘超林 b17e38f0e7 新建 пре 3 месеци
..
.github b17e38f0e7 新建 пре 3 месеци
test b17e38f0e7 新建 пре 3 месеци
.eslintrc b17e38f0e7 新建 пре 3 месеци
.nycrc b17e38f0e7 新建 пре 3 месеци
CHANGELOG.md b17e38f0e7 新建 пре 3 месеци
LICENSE b17e38f0e7 新建 пре 3 месеци
README.md b17e38f0e7 新建 пре 3 месеци
get.d.ts b17e38f0e7 新建 пре 3 месеци
get.js b17e38f0e7 新建 пре 3 месеци
package.json b17e38f0e7 新建 пре 3 месеци
set.d.ts b17e38f0e7 新建 пре 3 месеци
set.js b17e38f0e7 新建 пре 3 месеци
tsconfig.json b17e38f0e7 新建 пре 3 месеци

README.md

dunder-proto Version Badge

github actions coverage License Downloads

npm badge

If available, the Object.prototype.__proto__ accessor and mutator, call-bound.

Getting started

npm install --save dunder-proto

Usage/Examples

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);

Tests

Clone the repo, npm install, and run npm test