www_circl/node_modules/dunder-proto
2025-05-02 15:42:14 +02:00
..
.github base project 2025-05-02 15:42:14 +02:00
test base project 2025-05-02 15:42:14 +02:00
.eslintrc base project 2025-05-02 15:42:14 +02:00
.nycrc base project 2025-05-02 15:42:14 +02:00
CHANGELOG.md base project 2025-05-02 15:42:14 +02:00
get.d.ts base project 2025-05-02 15:42:14 +02:00
get.js base project 2025-05-02 15:42:14 +02:00
LICENSE base project 2025-05-02 15:42:14 +02:00
package.json base project 2025-05-02 15:42:14 +02:00
README.md base project 2025-05-02 15:42:14 +02:00
set.d.ts base project 2025-05-02 15:42:14 +02:00
set.js base project 2025-05-02 15:42:14 +02:00
tsconfig.json base project 2025-05-02 15:42:14 +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