Changeset 79a0317 for imaps-frontend/node_modules/is-symbol
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/is-symbol
- Files:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/is-symbol/CHANGELOG.md
r0c6b92a r79a0317 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [v1.1.1](https://github.com/inspect-js/is-symbol/compare/v1.1.0...v1.1.1) - 2024-12-12 9 10 ### Commits 11 12 - [actions] re-add finishers [`9b9d06f`](https://github.com/inspect-js/is-symbol/commit/9b9d06f571cf5b8481216b32474b567b02b14ae3) 13 - [Deps] update `call-bind`, `has-symbols`, `safe-regex-test` [`07f3647`](https://github.com/inspect-js/is-symbol/commit/07f36476b69e98353c09dc58cbcab8891e3ed2b7) 14 - [Refactor] use `call-bound` directly [`799402d`](https://github.com/inspect-js/is-symbol/commit/799402d3b0f291981b6406ec92c8c45cdad4e75e) 15 - [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig` [`4b8b2f9`](https://github.com/inspect-js/is-symbol/commit/4b8b2f9e844ebac93e89cf8e88e08ae0e8f4cc7f) 16 - [types] remove unneeded DT packages [`398abaa`](https://github.com/inspect-js/is-symbol/commit/398abaaea5a6192cd0eb9fda5f0a3cfb5b1da845) 17 18 ## [v1.1.0](https://github.com/inspect-js/is-symbol/compare/v1.0.4...v1.1.0) - 2024-12-02 19 20 ### Commits 21 22 - [actions] reuse common workflows [`acf85f0`](https://github.com/inspect-js/is-symbol/commit/acf85f027ec6ea70a7023646c47f9324ff9a5e25) 23 - [meta] use `npmignore` to autogenerate an npmignore file [`77c818e`](https://github.com/inspect-js/is-symbol/commit/77c818ebf4dc1107d945854185071ca76ef94d31) 24 - [Tests] use `for-each` and `es-value-fixtures` [`93dfed0`](https://github.com/inspect-js/is-symbol/commit/93dfed0de6c1da2946d83017cc0f44f8f7d15ded) 25 - [New] add types [`ed6a057`](https://github.com/inspect-js/is-symbol/commit/ed6a057e9595fb14c7d322ed4aba3433386d07bb) 26 - [actions] split out node 10-20, and 20+ [`7f81ccc`](https://github.com/inspect-js/is-symbol/commit/7f81ccc8bb2c667e6975f278c9dec7310a923749) 27 - [Robustness] use `call-bind` and `safe-regex-test` [`dc7e142`](https://github.com/inspect-js/is-symbol/commit/dc7e142724e9dce678b1ead151c7fedd02411a03) 28 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`70f87c2`](https://github.com/inspect-js/is-symbol/commit/70f87c2715ad4cc8e66ce0eb4a4d2c4034b8e19c) 29 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`3f02ff4`](https://github.com/inspect-js/is-symbol/commit/3f02ff4459ec96e22be4ef8cda0c966fafb5509a) 30 - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`9588872`](https://github.com/inspect-js/is-symbol/commit/95888727f109c7e9d2fdfe7ed419cc8452505503) 31 - [actions] update rebase action to use reusable workflow [`59e2f68`](https://github.com/inspect-js/is-symbol/commit/59e2f680992f630eb1d76dd8e009d7fa074e3055) 32 - [actions] update codecov uploader [`e4759f8`](https://github.com/inspect-js/is-symbol/commit/e4759f8bea3b66d6d70f8b7b2656cc9b987ca874) 33 - [Dev Deps] update `eslint`, `auto-changelog`, `object-inspect`, `tape` [`33990c0`](https://github.com/inspect-js/is-symbol/commit/33990c0d76db7f44bcf177f7f5b602747b159a35) 34 - [Tests] use `has-tostringtag` for more robust Symbol.toStringTag detection [`d6154e1`](https://github.com/inspect-js/is-symbol/commit/d6154e10f79b572630fd309543160c446d7e46ef) 35 - [Tests] replace `aud` with `npm audit` [`3215a60`](https://github.com/inspect-js/is-symbol/commit/3215a60cf4ffce688e3911025cf2ccca95e259d0) 36 - [Refactor] avoid an expensive check, for primitives [`59f1a42`](https://github.com/inspect-js/is-symbol/commit/59f1a428ae625b59b618493c2454096900451d84) 37 - [Deps] update `has-symbols` [`06be1a9`](https://github.com/inspect-js/is-symbol/commit/06be1a9d1bf57181e35b1ffe446196243cc8becc) 38 - [Dev Deps] add missing peer dep [`799b0da`](https://github.com/inspect-js/is-symbol/commit/799b0da1902dfa5b02456fcf32887ead6e332358) 7 39 8 40 ## [v1.0.4](https://github.com/inspect-js/is-symbol/compare/v1.0.3...v1.0.4) - 2021-05-08 -
imaps-frontend/node_modules/is-symbol/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var toStr = Object.prototype.toString; 3 var callBound = require('call-bound'); 4 var $toString = callBound('Object.prototype.toString'); 4 5 var hasSymbols = require('has-symbols')(); 6 var safeRegexTest = require('safe-regex-test'); 5 7 6 8 if (hasSymbols) { 7 var symToStr = Symbol.prototype.toString; 8 var symStringRegex = /^Symbol\(.*\)$/; 9 var $symToStr = callBound('Symbol.prototype.toString'); 10 var isSymString = safeRegexTest(/^Symbol\(.*\)$/); 11 12 /** @type {(value: object) => value is Symbol} */ 9 13 var isSymbolObject = function isRealSymbolObject(value) { 10 14 if (typeof value.valueOf() !== 'symbol') { 11 15 return false; 12 16 } 13 return symStringRegex.test(symToStr.call(value));17 return isSymString($symToStr(value)); 14 18 }; 15 19 20 /** @type {import('.')} */ 16 21 module.exports = function isSymbol(value) { 17 22 if (typeof value === 'symbol') { 18 23 return true; 19 24 } 20 if ( toStr.call(value) !== '[object Symbol]') {25 if (!value || typeof value !== 'object' || $toString(value) !== '[object Symbol]') { 21 26 return false; 22 27 } … … 28 33 }; 29 34 } else { 30 35 /** @type {import('.')} */ 31 36 module.exports = function isSymbol(value) { 32 37 // this environment does not support Symbols. -
imaps-frontend/node_modules/is-symbol/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "is-symbol", 3 "version": "1.0.4", 4 "description": "Determine if a value is an ES6 Symbol or not.", 5 "main": "index.js", 6 "scripts": { 7 "prepublishOnly": "safe-publish-latest", 8 "prepublish": "not-in-publish || npm run prepublishOnly", 9 "pretest": "npm run lint", 10 "tests-only": "nyc tape 'test/**/*.js'", 11 "test": "npm run tests-only", 12 "posttest": "npx aud --production", 13 "lint": "eslint .", 14 "version": "auto-changelog && git add CHANGELOG.md", 15 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 16 }, 17 "repository": { 18 "type": "git", 19 "url": "git://github.com/inspect-js/is-symbol.git" 20 }, 21 "keywords": [ 22 "symbol", 23 "es6", 24 "is", 25 "Symbol" 26 ], 27 "author": "Jordan Harband <ljharb@gmail.com>", 28 "funding": { 29 "url": "https://github.com/sponsors/ljharb" 30 }, 31 "license": "MIT", 32 "bugs": { 33 "url": "https://github.com/inspect-js/is-symbol/issues" 34 }, 35 "dependencies": { 36 "has-symbols": "^1.0.2" 37 }, 38 "devDependencies": { 39 "@ljharb/eslint-config": "^17.6.0", 40 "aud": "^1.1.5", 41 "auto-changelog": "^2.2.1", 42 "eslint": "^7.26.0", 43 "nyc": "^10.3.2", 44 "object-inspect": "^1.10.3", 45 "safe-publish-latest": "^1.1.4", 46 "tape": "^5.2.2" 47 }, 48 "testling": { 49 "files": "test/index.js", 50 "browsers": [ 51 "iexplore/6.0..latest", 52 "firefox/3.0..6.0", 53 "firefox/15.0..latest", 54 "firefox/nightly", 55 "chrome/4.0..10.0", 56 "chrome/20.0..latest", 57 "chrome/canary", 58 "opera/10.0..latest", 59 "opera/next", 60 "safari/4.0..latest", 61 "ipad/6.0..latest", 62 "iphone/6.0..latest", 63 "android-browser/4.2" 64 ] 65 }, 66 "engines": { 67 "node": ">= 0.4" 68 }, 69 "auto-changelog": { 70 "output": "CHANGELOG.md", 71 "template": "keepachangelog", 72 "unreleased": false, 73 "commitLimit": false, 74 "backfillLimit": false, 75 "hideCredit": true 76 } 2 "_from": "is-symbol@^1.0.4", 3 "_id": "is-symbol@1.1.1", 4 "_inBundle": false, 5 "_integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", 6 "_location": "/is-symbol", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "is-symbol@^1.0.4", 12 "name": "is-symbol", 13 "escapedName": "is-symbol", 14 "rawSpec": "^1.0.4", 15 "saveSpec": null, 16 "fetchSpec": "^1.0.4" 17 }, 18 "_requiredBy": [ 19 "/es-to-primitive", 20 "/which-boxed-primitive" 21 ], 22 "_resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", 23 "_shasum": "f47761279f532e2b05a7024a7506dbbedacd0634", 24 "_spec": "is-symbol@^1.0.4", 25 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/es-to-primitive", 26 "author": { 27 "name": "Jordan Harband", 28 "email": "ljharb@gmail.com" 29 }, 30 "auto-changelog": { 31 "output": "CHANGELOG.md", 32 "template": "keepachangelog", 33 "unreleased": false, 34 "commitLimit": false, 35 "backfillLimit": false, 36 "hideCredit": true 37 }, 38 "bugs": { 39 "url": "https://github.com/inspect-js/is-symbol/issues" 40 }, 41 "bundleDependencies": false, 42 "dependencies": { 43 "call-bound": "^1.0.2", 44 "has-symbols": "^1.1.0", 45 "safe-regex-test": "^1.1.0" 46 }, 47 "deprecated": false, 48 "description": "Determine if a value is an ES6 Symbol or not.", 49 "devDependencies": { 50 "@arethetypeswrong/cli": "^0.17.1", 51 "@ljharb/eslint-config": "^21.1.1", 52 "@ljharb/tsconfig": "^0.2.2", 53 "@types/for-each": "^0.3.3", 54 "@types/object-inspect": "^1.13.0", 55 "@types/tape": "^5.6.5", 56 "auto-changelog": "^2.5.0", 57 "encoding": "^0.1.13", 58 "es-value-fixtures": "^1.5.0", 59 "eslint": "=8.8.0", 60 "for-each": "^0.3.3", 61 "has-tostringtag": "^1.0.2", 62 "in-publish": "^2.0.1", 63 "npmignore": "^0.3.1", 64 "nyc": "^10.3.2", 65 "object-inspect": "^1.13.3", 66 "safe-publish-latest": "^2.0.0", 67 "tape": "^5.9.0", 68 "typescript": "next" 69 }, 70 "engines": { 71 "node": ">= 0.4" 72 }, 73 "funding": { 74 "url": "https://github.com/sponsors/ljharb" 75 }, 76 "homepage": "https://github.com/inspect-js/is-symbol#readme", 77 "keywords": [ 78 "symbol", 79 "es6", 80 "is", 81 "Symbol" 82 ], 83 "license": "MIT", 84 "main": "index.js", 85 "name": "is-symbol", 86 "publishConfig": { 87 "ignore": [ 88 ".github/workflows", 89 ".nvmrc" 90 ] 91 }, 92 "repository": { 93 "type": "git", 94 "url": "git://github.com/inspect-js/is-symbol.git" 95 }, 96 "scripts": { 97 "lint": "eslint --ext=js,mjs .", 98 "postlint": "tsc -p . && attw -P", 99 "posttest": "npx npm@'>=10.2' audit --production", 100 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 101 "prepack": "npmignore --auto --commentLines=autogenerated", 102 "prepublish": "not-in-publish || npm run prepublishOnly", 103 "prepublishOnly": "safe-publish-latest", 104 "pretest": "npm run lint", 105 "test": "npm run tests-only", 106 "tests-only": "nyc tape 'test/**/*.js'", 107 "version": "auto-changelog && git add CHANGELOG.md" 108 }, 109 "testling": { 110 "files": "test/index.js", 111 "browsers": [ 112 "iexplore/6.0..latest", 113 "firefox/3.0..6.0", 114 "firefox/15.0..latest", 115 "firefox/nightly", 116 "chrome/4.0..10.0", 117 "chrome/20.0..latest", 118 "chrome/canary", 119 "opera/10.0..latest", 120 "opera/next", 121 "safari/4.0..latest", 122 "ipad/6.0..latest", 123 "iphone/6.0..latest", 124 "android-browser/4.2" 125 ] 126 }, 127 "version": "1.1.1" 77 128 } -
imaps-frontend/node_modules/is-symbol/test/index.js
r0c6b92a r79a0317 2 2 3 3 var test = require('tape'); 4 var forEach = require('for-each'); 5 var v = require('es-value-fixtures'); 6 4 7 var isSymbol = require('../index'); 5 8 6 var forEach = function (arr, func) {7 var i;8 for (i = 0; i < arr.length; ++i) {9 func(arr[i], i, arr);10 }11 };12 13 9 var hasSymbols = require('has-symbols')(); 10 var hasToStringTag = require('has-tostringtag/shams')(); 14 11 var inspect = require('object-inspect'); 15 var debug = function (v, m) { return inspect(v) + ' ' + m; };16 12 17 13 test('non-symbol values', function (t) { 18 var nonSymbols = [ 19 true, 20 false, 14 var nonSymbols = v.nonSymbolPrimitives.concat( 21 15 Object(true), 22 16 Object(false), 23 null, 24 undefined, 17 // @ts-expect-error TS sucks with concat 25 18 {}, 26 19 [], 27 20 /a/g, 28 'string',29 42,30 21 new Date(), 31 22 function () {}, 32 23 NaN 33 ];24 ); 34 25 t.plan(nonSymbols.length); 35 26 forEach(nonSymbols, function (nonSymbol) { 36 t.equal( false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol'));27 t.equal(isSymbol(nonSymbol), false, inspect(nonSymbol) + ' is not a symbol'); 37 28 }); 38 29 t.end(); … … 42 33 t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { 43 34 var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; 44 st.equal( false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol');35 st.equal(isSymbol(fakeSymbol), false, 'object with valueOf returning a symbol is not a symbol'); 45 36 st.end(); 46 37 }); 47 38 48 t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { 39 t.test('faked @@toStringTag', { skip: !hasToStringTag }, function (st) { 40 /** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */ 49 41 var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; 50 42 fakeSymbol[Symbol.toStringTag] = 'Symbol'; 51 st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); 43 st.equal(isSymbol(fakeSymbol), false, 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); 44 45 /** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */ 52 46 var notSoFakeSymbol = { valueOf: function () { return 42; } }; 53 47 notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; 54 st.equal( false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol');48 st.equal(isSymbol(notSoFakeSymbol), false, 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); 55 49 st.end(); 56 50 }); 57 51 58 52 var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; 59 t.equal( false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol');53 t.equal(isSymbol(fakeSymbolString), false, 'object with toString returning Symbol(foo) is not a symbol'); 60 54 61 55 t.end(); … … 64 58 test('Symbol support', { skip: !hasSymbols }, function (t) { 65 59 t.test('well-known Symbols', function (st) { 60 /** @type {(name: string) => name is Exclude<keyof SymbolConstructor, 'for' | 'keyFor'>} */ 66 61 var isWellKnown = function filterer(name) { 67 62 return name !== 'for' && name !== 'keyFor' && !(name in filterer); … … 69 64 var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); 70 65 wellKnownSymbols.forEach(function (name) { 71 var sym = Symbol[name]; 72 st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); 66 // eslint-disable-next-line no-extra-parens 67 var sym = Symbol[/** @type {keyof SymbolConstructor} */ (name)]; 68 st.equal(isSymbol(sym), true, inspect(sym) + ' is a symbol'); 73 69 }); 74 70 st.end(); … … 76 72 77 73 t.test('user-created symbols', function (st) { 78 var symbols = [74 var symbols = v.symbols.concat( 79 75 Symbol(), 80 76 Symbol('foo'), 81 77 Symbol['for']('foo'), 82 78 Object(Symbol('object')) 83 ];79 ); 84 80 symbols.forEach(function (sym) { 85 st.equal( true, isSymbol(sym), debug(sym, ' is a symbol'));81 st.equal(isSymbol(sym), true, inspect(sym) + ' is a symbol'); 86 82 }); 87 83 st.end();
Note:
See TracChangeset
for help on using the changeset viewer.