You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Prajwal Shrestha ba6f33679e green tech 6 months ago
..
.github green tech 6 months ago
test green tech 6 months ago
.eslintrc green tech 6 months ago
.nycrc green tech 6 months ago
CHANGELOG.md green tech 6 months ago
LICENSE green tech 6 months ago
README.md green tech 6 months ago
get.d.ts green tech 6 months ago
get.js green tech 6 months ago
package.json green tech 6 months ago
set.d.ts green tech 6 months ago
set.js green tech 6 months ago
tsconfig.json green tech 6 months 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