dunder-proto

1.0.1 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.139,423,121latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.139,423,121
1.0.0649,779

Package Sidebar

Install

npm i dunder-proto

Weekly Downloads

40,072,900

Version

1.0.1

License

MIT

Unpacked Size

13 kB

Total Files

15

Last publish

Collaborators

  • ljharb