Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-weakset

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-weakset - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

.editorconfig

46

CHANGELOG.md

@@ -8,6 +8,33 @@ # Changelog

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v2.0.2](https://github.com/inspect-js/is-weakset/compare/v2.0.1...v2.0.2) - 2021-12-12
## [v2.0.1](https://github.com/inspect-js/is-weakset/compare/v2.0.0...v2.0.1) - 2019-12-18
### Commits
- [actions] reuse common workflows [`a8f7c7f`](https://github.com/inspect-js/is-weakset/commit/a8f7c7fa22088dabbadf82cd52cf962eca646c59)
- [Tests] migrate tests to Github Actions [`f38af72`](https://github.com/inspect-js/is-weakset/commit/f38af729300d425360caad1763e7f904dcd3e393)
- [Refactor] use `call-bind` and `get-intrinsic` to be more robust [`5102e7e`](https://github.com/inspect-js/is-weakset/commit/5102e7ef227f06da1bc8dcee2579af74f1e1a477)
- [meta] do not publish github action workflow files [`6ac6e8e`](https://github.com/inspect-js/is-weakset/commit/6ac6e8e5b15181e73d30f6d37e41955372b07792)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`304af52`](https://github.com/inspect-js/is-weakset/commit/304af52f4c40743b055e252d50c8e804cac4054f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es6-shim`, `object-inspect`, `tape` [`b82fb5f`](https://github.com/inspect-js/is-weakset/commit/b82fb5fafdeea05f93420e0966fe63785362649a)
- [Tests] run `nyc` on all tests; use `tape` runner [`89e2611`](https://github.com/inspect-js/is-weakset/commit/89e26115ab1aa58b37816d6b5e2aad62508bd79c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es5-shim`, `object-inspect`, `safe-publish-latest`, `tape` [`42b0bdc`](https://github.com/inspect-js/is-weakset/commit/42b0bdc5a8785ddb589ea16629c933ec01359ca8)
- [actions] update codecov uploader [`112697a`](https://github.com/inspect-js/is-weakset/commit/112697aaf3b6f2e22275575ce4b684059fa5dcaa)
- [actions] add "Allow Edits" workflow [`1af6ffe`](https://github.com/inspect-js/is-weakset/commit/1af6ffe2793a5784ac70048e50850f4d6e650de4)
- [readme] remove travis badge [`dff769b`](https://github.com/inspect-js/is-weakset/commit/dff769b367aa4886ab082dd6330cbc54d0dcf03f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`4494ced`](https://github.com/inspect-js/is-weakset/commit/4494cedea891e3617768b30721e3b5ddee5c41e4)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es5-shim`, `tape` [`a2c11c6`](https://github.com/inspect-js/is-weakset/commit/a2c11c6dcef990b7f6fabb26d58837a7fe4f3a3e)
- [Tests] add `core-js` tests [`cd619e9`](https://github.com/inspect-js/is-weakset/commit/cd619e95f64cc02cbec8f4b0b29a806f371eab9e)
- [readme] add actions and codecov badges [`d3cbefe`](https://github.com/inspect-js/is-weakset/commit/d3cbefeb526773a565eb4e501b2e7da7947b215d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`3d54035`](https://github.com/inspect-js/is-weakset/commit/3d54035e2ca66969f6cc779b85902ac3507d7297)
- [Dev Deps] update `auto-changelog`, `eslint` [`a80fb4a`](https://github.com/inspect-js/is-weakset/commit/a80fb4a7c1a90a2929d80f9b2a9adaa56c94d2d2)
- [actions] switch Automatic Rease workflow to `pull_request_target` event [`b3b8aee`](https://github.com/inspect-js/is-weakset/commit/b3b8aeeb3e133d88da897d42530aea4bcc729b23)
- [Dev Deps] update `es5-shim`, `tape` [`5ba5ca8`](https://github.com/inspect-js/is-weakset/commit/5ba5ca84a3d4bb4acacb9fd9265a21476d4f0457)
- [meta] use `prepublishOnly` script for npm 7+ [`b4f7636`](https://github.com/inspect-js/is-weakset/commit/b4f76366574ac4b4d854c330cbad33a8d9ff48ff)
- [Dev Deps] update `auto-changelog`; add `aud` [`2ccd594`](https://github.com/inspect-js/is-weakset/commit/2ccd5944c8fd161fa463620de268bd6f40ff0e59)
- [Fix] when `WeakSet` lacks a `has`, return false [`53a2cbc`](https://github.com/inspect-js/is-weakset/commit/53a2cbce11d2493b4ff82132f3d14e22c909b541)
- [Tests] only audit prod deps [`f74aaf5`](https://github.com/inspect-js/is-weakset/commit/f74aaf5746fc49d424742184025288d0d565639c)
- [meta] normalize line endings [`31f60a6`](https://github.com/inspect-js/is-weakset/commit/31f60a6a70e38851743e602e30bb0907cd3cc6ba)
## [v2.0.1](https://github.com/inspect-js/is-weakset/compare/v2.0.0...v2.0.1) - 2019-12-17
### Fixed

@@ -23,3 +50,3 @@

## v2.0.0 - 2019-11-12
## [v2.0.0](https://github.com/inspect-js/is-weakset/compare/v1.0.1...v2.0.0) - 2019-11-12

@@ -39,1 +66,14 @@ ### Commits

- [Tests] add `npx aud` in `posttest` [`53ceba1`](https://github.com/inspect-js/is-weakset/commit/53ceba16b0a98f968e40439f7bd2ffc98a406de8)
## [v1.0.1](https://github.com/inspect-js/is-weakset/compare/v1.0.0...v1.0.1) - 2015-06-03
### Commits
- Tweaks [`cb3a689`](https://github.com/inspect-js/is-weakset/commit/cb3a68985d734632423ffe81704500bd04e95934)
- Add `related` section to readme [`7c2766b`](https://github.com/inspect-js/is-weakset/commit/7c2766b3e1992b34d5ad933f2cf8901352aa4fcd)
## v1.0.0 - 2015-02-18
### Commits
- init [`579f442`](https://github.com/inspect-js/is-weakset/commit/579f442c42afa4e3880f9f62b3ccea79e0b6edd5)

56

index.js
'use strict';
var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bind/callBound');
var exported;
var $WeakSet = GetIntrinsic('%WeakSet%', true);
if (!$WeakMap) {
// eslint-disable-next-line no-unused-vars
exported = function isWeakSet(x) {
// `WeakSet` is not present in this environment.
var $setHas = callBound('WeakSet.prototype.has', true);
if ($setHas) {
var $mapHas = callBound('WeakMap.prototype.has', true);
module.exports = function isWeakSet(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$setHas(x, $setHas);
if ($mapHas) {
try {
$mapHas(x, $mapHas);
} catch (e) {
return true;
}
}
return x instanceof $WeakSet; // core-js workaround, pre-v3
} catch (e) {}
return false;
};
}
var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$setHas) {
} else {
// eslint-disable-next-line no-unused-vars
module.exports = function isWeakSet(x) {
// `WeakSet` does not have a `has` method
// `WeakSet` does not exist, or does not have a `has` method
return false;
};
}
module.exports = exported || function isWeakSet(x) {
if (!x || typeof x !== 'object') {
return false;
}
try {
$setHas.call(x, $setHas);
if ($mapHas) {
try {
$mapHas.call(x, $mapHas);
} catch (e) {
return true;
}
}
return x instanceof $WeakSet; // core-js workaround, pre-v3
} catch (e) {}
return false;
};
{
"name": "is-weakset",
"version": "2.0.1",
"version": "2.0.2",
"description": "Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",

@@ -9,9 +9,11 @@ "main": "index.js",

"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublish": "safe-publish-latest",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"lint": "eslint .",
"tests-only": "node test",
"posttests-only": "node -e \"require('es5-shim'); require('es6-shim'); require('./test');\"",
"test": "npm run tests-only",
"posttest": "npx aud"
"lint": "eslint --ext=js,mjs .",
"tests-only": "nyc tape 'test/**/*.js'",
"tests:shims": "nyc tape --require=es5-shim --require=es6-shim 'test/**/*.js'",
"tests:corejs": "nyc tape --require=core-js 'test/**/*.js'",
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs",
"posttest": "aud --production"
},

@@ -41,11 +43,14 @@ "repository": {

"devDependencies": {
"@ljharb/eslint-config": "^15.0.2",
"auto-changelog": "^1.16.2",
"es5-shim": "^4.5.13",
"es6-shim": "^0.35.5",
"eslint": "^6.7.2",
"@ljharb/eslint-config": "^20.0.0",
"aud": "^1.1.5",
"auto-changelog": "^2.3.0",
"core-js": "^2.6.12",
"es5-shim": "^4.6.2",
"es6-shim": "^0.35.6",
"eslint": "^8.4.1",
"for-each": "^0.3.3",
"object-inspect": "^1.7.0",
"safe-publish-latest": "^1.1.4",
"tape": "^4.12.0"
"nyc": "^10.3.2",
"object-inspect": "^1.11.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.3.2"
},

@@ -57,4 +62,9 @@ "auto-changelog": {

"commitLimit": false,
"backfillLimit": false
"backfillLimit": false,
"hideCredit": true
},
"dependencies": {
"call-bind": "^1.0.2",
"get-intrinsic": "^1.1.1"
}
}
# is-weakset <sup>[![Version Badge][2]][1]</sup>
[![Build Status][3]][4]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]

@@ -38,5 +39,3 @@ [![dev dependency status][7]][8]

[1]: https://npmjs.org/package/is-weakset
[2]: http://versionbadg.es/inspect-js/is-weakset.svg
[3]: https://travis-ci.org/inspect-js/is-weakset.svg
[4]: https://travis-ci.org/inspect-js/is-weakset
[2]: https://versionbadg.es/inspect-js/is-weakset.svg
[5]: https://david-dm.org/inspect-js/is-weakset.svg

@@ -47,5 +46,9 @@ [6]: https://david-dm.org/inspect-js/is-weakset

[11]: https://nodei.co/npm/is-weakset.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/is-weakset.svg
[license-image]: https://img.shields.io/npm/l/is-weakset.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/is-weakset.svg
[downloads-url]: http://npm-stat.com/charts.html?package=is-weakset
[downloads-image]: https://img.shields.io/npm/dm/is-weakset.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-weakset
[codecov-image]: https://codecov.io/gh/inspect-js/is-weakset/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakset/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakset
[actions-url]: https://github.com/inspect-js/is-weakset/actions

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc