dunder-proto
If available, the `Object.prototype.__proto__` accessor and mutator, call-bound
Last updated 20 days ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install dunder-proto 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (20 days ago)

1 Versions

  • 1.0.0                                ...           20 days ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (14)

© 2010 - cnpmjs.org x YWFE | Home | YWFE