潘超林 79770928d5 init: 初始化项目 2 tygodni temu
..
.github 79770928d5 init: 初始化项目 2 tygodni temu
test 79770928d5 init: 初始化项目 2 tygodni temu
.eslintrc 79770928d5 init: 初始化项目 2 tygodni temu
.nycrc 79770928d5 init: 初始化项目 2 tygodni temu
CHANGELOG.md 79770928d5 init: 初始化项目 2 tygodni temu
LICENSE 79770928d5 init: 初始化项目 2 tygodni temu
README.md 79770928d5 init: 初始化项目 2 tygodni temu
get.d.ts 79770928d5 init: 初始化项目 2 tygodni temu
get.js 79770928d5 init: 初始化项目 2 tygodni temu
package.json 79770928d5 init: 初始化项目 2 tygodni temu
set.d.ts 79770928d5 init: 初始化项目 2 tygodni temu
set.js 79770928d5 init: 初始化项目 2 tygodni temu
tsconfig.json 79770928d5 init: 初始化项目 2 tygodni temu

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