Frontend/25_01_07/mai/node_modules/dunder-proto
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00
..
.github asd 2025-01-28 11:38:27 +01:00
test asd 2025-01-28 11:38:27 +01:00
.eslintrc asd 2025-01-28 11:38:27 +01:00
.nycrc asd 2025-01-28 11:38:27 +01:00
CHANGELOG.md asd 2025-01-28 11:38:27 +01:00
get.d.ts asd 2025-01-28 11:38:27 +01:00
get.js asd 2025-01-28 11:38:27 +01:00
LICENSE asd 2025-01-28 11:38:27 +01:00
package.json asd 2025-01-28 11:38:27 +01:00
README.md asd 2025-01-28 11:38:27 +01:00
set.d.ts asd 2025-01-28 11:38:27 +01:00
set.js asd 2025-01-28 11:38:27 +01:00
tsconfig.json asd 2025-01-28 11:38:27 +01:00

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