Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

dunder-proto

es-shims81.5mMIT1.0.1

If available, the Object.prototype.__proto__ accessor and mutator, call-bound

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.1 - 2024-12-16

Commits

  • [Fix] do not crash when --disable-proto=throw 6c367d9
  • [Tests] ensure noproto tests only use the current version of dunder-proto b02365b
  • [Dev Deps] update @arethetypeswrong/cli, @types/tape e3c5c3b
  • [Deps] update call-bind-apply-helpers 19f1da0

v1.0.0 - 2024-12-06

Commits