冯博深 f143f24da4 first 18 giờ trước cách đây
..
.github f143f24da4 first 18 giờ trước cách đây
test f143f24da4 first 18 giờ trước cách đây
.eslintrc f143f24da4 first 18 giờ trước cách đây
.nycrc f143f24da4 first 18 giờ trước cách đây
CHANGELOG.md f143f24da4 first 18 giờ trước cách đây
LICENSE f143f24da4 first 18 giờ trước cách đây
README.md f143f24da4 first 18 giờ trước cách đây
get.d.ts f143f24da4 first 18 giờ trước cách đây
get.js f143f24da4 first 18 giờ trước cách đây
package.json f143f24da4 first 18 giờ trước cách đây
set.d.ts f143f24da4 first 18 giờ trước cách đây
set.js f143f24da4 first 18 giờ trước cách đây
tsconfig.json f143f24da4 first 18 giờ trước cách đây

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