zheng f326829555 仓库 1 неделя назад
..
.github f326829555 仓库 1 неделя назад
test f326829555 仓库 1 неделя назад
.eslintrc f326829555 仓库 1 неделя назад
.nycrc f326829555 仓库 1 неделя назад
CHANGELOG.md f326829555 仓库 1 неделя назад
LICENSE f326829555 仓库 1 неделя назад
README.md f326829555 仓库 1 неделя назад
get.d.ts f326829555 仓库 1 неделя назад
get.js f326829555 仓库 1 неделя назад
package.json f326829555 仓库 1 неделя назад
set.d.ts f326829555 仓库 1 неделя назад
set.js f326829555 仓库 1 неделя назад
tsconfig.json f326829555 仓库 1 неделя назад

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