has-symbols
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -8,8 +8,32 @@ # Changelog | ||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). | ||
## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 | ||
## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-17 | ||
### Fixed | ||
- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) | ||
### Commits | ||
- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) | ||
- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) | ||
- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) | ||
- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) | ||
- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) | ||
- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) | ||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) | ||
- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) | ||
- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) | ||
- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) | ||
- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) | ||
- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) | ||
## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 | ||
### Commits | ||
- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) | ||
@@ -16,0 +40,0 @@ - [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) |
'use strict'; | ||
var origSymbol = global.Symbol; | ||
var origSymbol = typeof Symbol !== 'undefined' && Symbol; | ||
var hasSymbolSham = require('./shams'); | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "has-symbols", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": { | ||
@@ -25,11 +25,11 @@ "name": "Jordan Harband", | ||
"pretest": "npm run --silent lint", | ||
"test": "npm run --silent tests-only", | ||
"posttest": "npx aud", | ||
"tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", | ||
"test:stock": "node test", | ||
"test:staging": "node --harmony --es-staging test", | ||
"test": "npm run tests-only", | ||
"posttest": "aud --production", | ||
"tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", | ||
"test:stock": "nyc node test", | ||
"test:staging": "nyc node --harmony --es-staging test", | ||
"test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", | ||
"test:shams:corejs": "node test/shams/core-js.js", | ||
"test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", | ||
"lint": "eslint *.js", | ||
"test:shams:corejs": "nyc node test/shams/core-js.js", | ||
"test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", | ||
"lint": "eslint --ext=js,mjs .", | ||
"version": "auto-changelog && git add CHANGELOG.md", | ||
@@ -40,3 +40,3 @@ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" | ||
"type": "git", | ||
"url": "git://github.com/ljharb/has-symbols.git" | ||
"url": "git://github.com/inspect-js/has-symbols.git" | ||
}, | ||
@@ -53,11 +53,12 @@ "keywords": [ | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^15.0.1", | ||
"auto-changelog": "^1.16.2", | ||
"core-js": "^2.6.10", | ||
"eslint": "^6.6.0", | ||
"get-own-property-symbols": "^0.9.4", | ||
"@ljharb/eslint-config": "^17.5.1", | ||
"aud": "^1.1.4", | ||
"auto-changelog": "^2.2.1", | ||
"core-js": "^2.6.12", | ||
"eslint": "^7.20.0", | ||
"get-own-property-symbols": "^0.9.5", | ||
"nyc": "^10.3.2", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^4.11.0" | ||
"tape": "^5.2.0" | ||
}, | ||
@@ -90,4 +91,10 @@ "testling": { | ||
"commitLimit": false, | ||
"backfillLimit": false | ||
"backfillLimit": false, | ||
"hideCredit": true | ||
}, | ||
"greenkeeper": { | ||
"ignore": [ | ||
"core-js" | ||
] | ||
} | ||
} |
# has-symbols <sup>[![Version Badge][2]][1]</sup> | ||
[![Build Status][3]][4] | ||
[![dependency status][5]][6] | ||
@@ -32,15 +31,11 @@ [![dev dependency status][7]][8] | ||
[1]: https://npmjs.org/package/has-symbols | ||
[2]: http://versionbadg.es/ljharb/has-symbols.svg | ||
[3]: https://travis-ci.org/ljharb/has-symbols.svg | ||
[4]: https://travis-ci.org/ljharb/has-symbols | ||
[5]: https://david-dm.org/ljharb/has-symbols.svg | ||
[6]: https://david-dm.org/ljharb/has-symbols | ||
[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg | ||
[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies | ||
[9]: https://ci.testling.com/ljharb/has-symbols.png | ||
[10]: https://ci.testling.com/ljharb/has-symbols | ||
[2]: https://versionbadg.es/inspect-js/has-symbols.svg | ||
[5]: https://david-dm.org/inspect-js/has-symbols.svg | ||
[6]: https://david-dm.org/inspect-js/has-symbols | ||
[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg | ||
[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies | ||
[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true | ||
[license-image]: http://img.shields.io/npm/l/has-symbols.svg | ||
[license-image]: https://img.shields.io/npm/l/has-symbols.svg | ||
[license-url]: LICENSE | ||
[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg | ||
[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols | ||
[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg | ||
[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols |
@@ -26,3 +26,3 @@ 'use strict'; | ||
obj[sym] = symVal; | ||
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax | ||
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop | ||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } | ||
@@ -29,0 +29,0 @@ |
@@ -8,3 +8,3 @@ 'use strict'; | ||
test('interface', function (t) { | ||
t.equal(typeof hasSymbols, 'function', 'is a function'); | ||
t.equal(typeof hasSymbols, 'function', 'is a function'); | ||
t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); | ||
@@ -11,0 +11,0 @@ t.end(); |
'use strict'; | ||
// eslint-disable-next-line consistent-return | ||
module.exports = function runSymbolTests(t) { | ||
t.equal(typeof Symbol, 'function', 'global Symbol is a function'); | ||
if (typeof Symbol !== 'function') { return false }; | ||
if (typeof Symbol !== 'function') { return false; } | ||
@@ -18,5 +19,5 @@ t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); | ||
/* | ||
var foo = Symbol('foo'); | ||
/* | ||
t.notEqual( | ||
@@ -43,2 +44,3 @@ String(foo), | ||
obj[sym] = symVal; | ||
// eslint-disable-next-line no-restricted-syntax | ||
for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } | ||
@@ -45,0 +47,0 @@ |
18056
147
9
41