ChessNut/backend/node_modules/dunder-proto
2025-10-13 23:10:11 +02:00
..
.github first frontend 2025-10-13 23:10:11 +02:00
test first frontend 2025-10-13 23:10:11 +02:00
.eslintrc first frontend 2025-10-13 23:10:11 +02:00
.nycrc first frontend 2025-10-13 23:10:11 +02:00
CHANGELOG.md first frontend 2025-10-13 23:10:11 +02:00
get.d.ts first frontend 2025-10-13 23:10:11 +02:00
get.js first frontend 2025-10-13 23:10:11 +02:00
LICENSE first frontend 2025-10-13 23:10:11 +02:00
package.json first frontend 2025-10-13 23:10:11 +02:00
README.md first frontend 2025-10-13 23:10:11 +02:00
set.d.ts first frontend 2025-10-13 23:10:11 +02:00
set.js first frontend 2025-10-13 23:10:11 +02:00
tsconfig.json first frontend 2025-10-13 23:10:11 +02:00

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