quiz2023 / node_modules / dunder-proto /
@Moriya Kaito Moriya Kaito authored on 17 Aug
..
.github 追加 1 month ago
test 追加 1 month ago
.eslintrc 追加 1 month ago
.nycrc 追加 1 month ago
CHANGELOG.md 追加 1 month ago
LICENSE 追加 1 month ago
README.md 追加 1 month ago
get.d.ts 追加 1 month ago
get.js 追加 1 month ago
package.json 追加 1 month ago
set.d.ts 追加 1 month ago
set.js 追加 1 month ago
tsconfig.json 追加 1 month 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