it-architecture/frontend/node_modules/dunder-proto
kangwenjing 30d78998f1 init 2026-10-12 09:03:19 +08:00
..
.github init 2026-10-12 09:03:19 +08:00
test init 2026-10-12 09:03:19 +08:00
.eslintrc init 2026-10-12 09:03:19 +08:00
.nycrc init 2026-10-12 09:03:19 +08:00
CHANGELOG.md init 2026-10-12 09:03:19 +08:00
LICENSE init 2026-10-12 09:03:19 +08:00
README.md init 2026-10-12 09:03:19 +08:00
get.d.ts init 2026-10-12 09:03:19 +08:00
get.js init 2026-10-12 09:03:19 +08:00
package.json init 2026-10-12 09:03:19 +08:00
set.d.ts init 2026-10-12 09:03:19 +08:00
set.js init 2026-10-12 09:03:19 +08:00
tsconfig.json init 2026-10-12 09:03:19 +08:00

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