vmk-demo-bot / admin / node_modules / dunder-proto /
..
.github init 18 days ago
test init 18 days ago
.eslintrc init 18 days ago
.nycrc init 18 days ago
CHANGELOG.md init 18 days ago
LICENSE init 18 days ago
README.md init 18 days ago
get.d.ts init 18 days ago
get.js init 18 days ago
package.json init 18 days ago
set.d.ts init 18 days ago
set.js init 18 days ago
tsconfig.json init 18 days ago
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