{"_id":"is-weakref","_rev":"3744985","name":"is-weakref","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:28:10.000Z","created":"2020-08-02T06:14:23.880Z","1.1.1":"2025-02-03T23:37:46.871Z","1.1.0":"2024-12-13T16:01:46.314Z","1.0.2":"2021-12-10T16:46:37.781Z","1.0.1":"2020-12-05T00:04:02.450Z","1.0.0":"2020-08-02T06:14:23.880Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"versions":{"1.1.1":{"name":"is-weakref","version":"1.1.1","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"keywords":["weakref","weak","ref","finalization","finalization registry"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"homepage":"https://github.com/inspect-js/is-weakref#readme","devDependencies":{"@arethetypeswrong/cli":"^0.17.3","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.3","@types/for-each":"^0.3.3","@types/object-inspect":"^1.13.0","@types/tape":"^5.8.1","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","for-each":"^0.3.4","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.3","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"dependencies":{"call-bound":"^1.0.3"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"is-weakref@1.1.1","gitHead":"cfd95f008fa62947affe7b14cdcf1ad3d2a5d3b6","types":"./index.d.ts","_nodeVersion":"23.6.1","_npmVersion":"10.9.2","dist":{"shasum":"eea430182be8d64174bd96bffbc46f21bf3f9293","size":6265,"noattachment":false,"key":"/is-weakref/-/is-weakref-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-weakref/download/is-weakref-1.1.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-weakref_1.1.1_1738625866708_0.7128288633815065"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-02-03T23:37:46.871Z","publish_time":1738625866871,"_source_registry_name":"default","_cnpm_publish_time":1738625866871},"1.1.0":{"name":"is-weakref","version":"1.1.0","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","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)\")\"","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"keywords":["weakref","weak","ref","finalization","finalization registry"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"homepage":"https://github.com/inspect-js/is-weakref#readme","devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/for-each":"^0.3.3","@types/object-inspect":"^1.13.0","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.3","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"dependencies":{"call-bound":"^1.0.2"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"is-weakref@1.1.0","gitHead":"8f3dd81e2382f7fdcd91f36b4a03bba18b6286aa","types":"./index.d.ts","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"47e3472ae95a63fa9cf25660bcf0c181c39770ef","size":6043,"noattachment":false,"key":"/is-weakref/-/is-weakref-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-weakref/download/is-weakref-1.1.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-weakref_1.1.0_1734105706050_0.03721194316043852"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-13T16:01:46.314Z","publish_time":1734105706314,"_source_registry_name":"default","_cnpm_publish_time":1734105706314},"1.0.2":{"name":"is-weakref","version":"1.0.2","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"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)\")\"","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"keywords":["weakref","weak","ref","finalization","finalization registry"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"homepage":"https://github.com/inspect-js/is-weakref#readme","devDependencies":{"@ljharb/eslint-config":"^20.0.0","aud":"^1.1.5","auto-changelog":"^2.3.0","eslint":"^8.4.1","for-each":"^0.3.3","nyc":"^10.3.2","object-inspect":"^1.11.1","safe-publish-latest":"^2.0.0","tape":"^5.3.2"},"dependencies":{"call-bind":"^1.0.2"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"f63853b41b499be00bc3d4b519a4c6e3844a467c","_id":"is-weakref@1.0.2","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"shasum":"9529f383a9338205e89765e0392efc2f100f06f2","size":4966,"noattachment":false,"key":"/is-weakref/-/is-weakref-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-weakref/download/is-weakref-1.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-weakref_1.0.2_1639154797576_0.06622627464366948"},"_hasShrinkwrap":false,"publish_time":1639154797781,"_cnpm_publish_time":1639154797781},"1.0.1":{"name":"is-weakref","version":"1.0.1","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","main":"index.js","exports":{".":[{"default":"./index.js"},"./index.js"]},"scripts":{"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)\")\"","lint":"eslint .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"keywords":["weakref","weak","ref","finalization","finalization registry"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"homepage":"https://github.com/inspect-js/is-weakref#readme","devDependencies":{"@ljharb/eslint-config":"^17.3.0","aud":"^1.1.3","auto-changelog":"^2.2.1","eslint":"^7.14.0","for-each":"^0.3.3","nyc":"^10.3.2","object-inspect":"^1.9.0","tape":"^5.0.1"},"dependencies":{"call-bind":"^1.0.0"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"74690b82395ef4097c51f52da1842f7ecb872014","_id":"is-weakref@1.0.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"842dba4ec17fa9ac9850df2d6efbc1737274f2a2","size":5174,"noattachment":false,"key":"/is-weakref/-/is-weakref-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-weakref/download/is-weakref-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-weakref_1.0.1_1607126642309_0.36375713517997355"},"_hasShrinkwrap":false,"publish_time":1607126642450,"_cnpm_publish_time":1607126642450},"1.0.0":{"name":"is-weakref","version":"1.0.0","description":"Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.","main":"index.js","exports":{".":[{"default":"./index.js"},"./index.js"]},"scripts":{"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)\")\"","lint":"eslint .","pretest":"npm run lint","tests-only":"tape test","test":"npm run tests-only","posttest":"aud --production"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-weakref.git"},"keywords":["weakref","weak","ref","finalization","finalization registry"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"homepage":"https://github.com/inspect-js/is-weakref#readme","devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.0","eslint":"^7.6.0","for-each":"^0.3.3","object-inspect":"^1.8.0","tape":"^5.0.1"},"dependencies":{"es-abstract":"^1.17.6"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"b0d91783d6c1ceda8bea2a79096fef6dd4310c62","_id":"is-weakref@1.0.0","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"shasum":"9503d514ce5f30e1ebea79dec0a8ac4c197758b4","size":3915,"noattachment":false,"key":"/is-weakref/-/is-weakref-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-weakref/download/is-weakref-1.0.0.tgz"},"maintainers":[{"name":"ljharb","email":""}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-weakref_1.0.0_1596348863731_0.25731775245487576"},"_hasShrinkwrap":false,"publish_time":1596348863880,"_cnpm_publish_time":1596348863880}},"readme":"# is-weakref <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\nIs this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.\n\n## Example\n\n```js\nvar isWeakRef = require('is-weakref');\nassert(!isWeakRef(function () {}));\nassert(!isWeakRef(null));\nassert(!isWeakRef(function* () { yield 42; return Infinity; });\nassert(!isWeakRef(Symbol('foo')));\nassert(!isWeakRef(1n));\nassert(!isWeakRef(Object(1n)));\n\nassert(!isWeakRef(new Set()));\nassert(!isWeakRef(new WeakSet()));\nassert(!isWeakRef(new Map()));\nassert(!isWeakRef(new WeakMap()));\n\nassert(isWeakRef(new WeakRef({})));\n\nclass MyWeakRef extends WeakRef {}\nassert(isWeakRef(new MyWeakRef({})));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/is-weakref\n[npm-version-svg]: https://versionbadg.es/inspect-js/is-weakref.svg\n[deps-svg]: https://david-dm.org/inspect-js/is-weakref.svg\n[deps-url]: https://david-dm.org/inspect-js/is-weakref\n[dev-deps-svg]: https://david-dm.org/inspect-js/is-weakref/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/is-weakref#info=devDependencies\n[license-image]: https://img.shields.io/npm/l/is-weakref.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-weakref.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-weakref\n[codecov-image]: https://codecov.io/gh/inspect-js/is-weakref/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakref/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakref\n[actions-url]: https://github.com/inspect-js/is-weakref/actions\n","_attachments":{},"homepage":"https://github.com/inspect-js/is-weakref#readme","bugs":{"url":"https://github.com/inspect-js/is-weakref/issues"},"license":"MIT"}