{"_id":"set-proto","_rev":"3745015","name":"set-proto","description":"Robustly set the [[Prototype]] of an object","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:28:19.000Z","created":"2024-12-30T23:30:07.537Z","1.0.0":"2024-12-30T23:30:07.537Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-proto.git"},"versions":{"1.0.0":{"name":"set-proto","version":"1.0.0","description":"Robustly set the [[Prototype]] of an object","main":"index.js","exports":{".":"./index.js","./Reflect.setPrototypeOf":"./Reflect.setPrototypeOf.js","./Object.setPrototypeOf":"./Object.setPrototypeOf.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"npx npm@\">=10.2\" audit --production","tests-only":"nyc tape 'test/**/*.js'","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/set-proto.git"},"keywords":["set","proto","prototype","setPrototypeOf","[[Prototype]]"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/set-proto/issues"},"homepage":"https://github.com/ljharb/set-proto#readme","dependencies":{"dunder-proto":"^1.0.1","es-errors":"^1.3.0","es-object-atoms":"^1.0.0"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.2","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.3","@types/tape":"^5.8.0","auto-changelog":"^2.5.0","eslint":"=8.8.0","evalmd":"^0.0.19","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"testling":{"files":"test/index.js"},"_id":"set-proto@1.0.0","gitHead":"0509142520ca52029ca6d3c31addfa97135ccdd7","types":"./index.d.ts","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"0760dbcff30b2d7e801fd6e19983e56da337565e","size":4194,"noattachment":false,"key":"/set-proto/-/set-proto-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/set-proto/download/set-proto-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/set-proto_1.0.0_1735601407354_0.25917478856816256"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-30T23:30:07.537Z","publish_time":1735601407537,"_source_registry_name":"default","_cnpm_publish_time":1735601407537}},"readme":"# set-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nRobustly set the [[Prototype]] of an object. Uses the best available method.\n\n## Getting started\n\n```sh\nnpm install --save set-proto\n```\n\n## Usage/Examples\n\n```js\nconst assert = require('assert');\nconst setProto = require('set-proto');\n\nconst a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };\nconst b = { c: 3 };\n\nassert.ok(!('c' in a));\n\nsetProto(a, b);\n\nassert.ok('c' in a);\n```\n\n## Tests\n\nClone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/set-proto\n[npm-version-svg]: https://versionbadg.es/ljharb/set-proto.svg\n[deps-svg]: https://david-dm.org/ljharb/set-proto.svg\n[deps-url]: https://david-dm.org/ljharb/set-proto\n[dev-deps-svg]: https://david-dm.org/ljharb/set-proto/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/set-proto#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/set-proto.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/set-proto.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/set-proto.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=set-proto\n[codecov-image]: https://codecov.io/gh/ljharb/set-proto/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/set-proto/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-proto\n[actions-url]: https://github.com/ljharb/set-proto/actions\n","_attachments":{},"homepage":"https://github.com/ljharb/set-proto#readme","bugs":{"url":"https://github.com/ljharb/set-proto/issues"},"license":"MIT"}