max_liu b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
test b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
README.md b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
get.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
get.js b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
package.json b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
set.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
set.js b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 пре 2 недеља

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