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