zhizhi/backend/coldstart/node_modules/dunder-proto
飞毛嘴帅气爱 21310c4792 M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
..
.github M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
test M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
.eslintrc M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
.nycrc M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
CHANGELOG.md M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
LICENSE M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
README.md M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
get.d.ts M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
get.js M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
package.json M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
set.d.ts M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
set.js M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00
tsconfig.json M14-环节4: 热身历史持久化+查询API 2026-03-08 17:56:28 +08:00

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