pax_global_header00006660000000000000000000000064147303257700014522gustar00rootroot0000000000000052 comment=1489d87a1af261f0f90faa73c619090363f7976b inspect-js-get-symbol-description-c6acc43/000077500000000000000000000000001473032577000206725ustar00rootroot00000000000000inspect-js-get-symbol-description-c6acc43/.eslintrc000066400000000000000000000002341473032577000225150ustar00rootroot00000000000000{ "root": true, "extends": "@ljharb", "rules": { "id-length": 0, "new-cap": [2, { "capIsNewExceptions": [ "GetIntrinsic", ], }], }, } inspect-js-get-symbol-description-c6acc43/.github/000077500000000000000000000000001473032577000222325ustar00rootroot00000000000000inspect-js-get-symbol-description-c6acc43/.github/FUNDING.yml000066400000000000000000000011211473032577000240420ustar00rootroot00000000000000# These are supported funding model platforms github: [ljharb] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: npm/get-symbol-description community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] inspect-js-get-symbol-description-c6acc43/.github/workflows/000077500000000000000000000000001473032577000242675ustar00rootroot00000000000000inspect-js-get-symbol-description-c6acc43/.github/workflows/node-aught.yml000066400000000000000000000005161473032577000270470ustar00rootroot00000000000000name: 'Tests: node.js < 10' on: [pull_request, push] jobs: tests: uses: ljharb/actions/.github/workflows/node.yml@main with: range: '< 10' type: minors command: npm run tests-only node: name: 'node < 10' needs: [tests] runs-on: ubuntu-latest steps: - run: 'echo tests completed' inspect-js-get-symbol-description-c6acc43/.github/workflows/node-pretest.yml000066400000000000000000000002061473032577000274210ustar00rootroot00000000000000name: 'Tests: pretest/posttest' on: [pull_request, push] jobs: tests: uses: ljharb/actions/.github/workflows/pretest.yml@main inspect-js-get-symbol-description-c6acc43/.github/workflows/node-tens.yml000066400000000000000000000005471473032577000267140ustar00rootroot00000000000000name: 'Tests: node.js 10 - 20' on: [pull_request, push] permissions: contents: read jobs: tests: uses: ljharb/actions/.github/workflows/node.yml@main with: range: '>= 10 < 20' type: minors command: npm run tests-only node: name: 'node 10 - 20' needs: [tests] runs-on: ubuntu-latest steps: - run: true inspect-js-get-symbol-description-c6acc43/.github/workflows/node-twenties.yml000066400000000000000000000005361473032577000276030ustar00rootroot00000000000000name: 'Tests: node.js >= 20' on: [pull_request, push] permissions: contents: read jobs: tests: uses: ljharb/actions/.github/workflows/node.yml@main with: range: '>= 20' type: minors command: npm run tests-only node: name: 'node >= 20' needs: [tests] runs-on: ubuntu-latest steps: - run: true inspect-js-get-symbol-description-c6acc43/.github/workflows/rebase.yml000066400000000000000000000002571473032577000262570ustar00rootroot00000000000000name: Automatic Rebase on: [pull_request_target] jobs: _: uses: ljharb/actions/.github/workflows/rebase.yml@main secrets: token: ${{ secrets.GITHUB_TOKEN }} inspect-js-get-symbol-description-c6acc43/.github/workflows/require-allow-edits.yml000066400000000000000000000003031473032577000307040ustar00rootroot00000000000000name: Require “Allow Edits” on: [pull_request_target] jobs: _: name: "Require “Allow Edits”" runs-on: ubuntu-latest steps: - uses: ljharb/require-allow-edits@main inspect-js-get-symbol-description-c6acc43/.gitignore000066400000000000000000000032511473032577000226630ustar00rootroot00000000000000# Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and *not* Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Only apps should have lockfiles npm-shrinkwrap.json package-lock.json yarn.lock .npmignore inspect-js-get-symbol-description-c6acc43/.npmrc000066400000000000000000000000671473032577000220150ustar00rootroot00000000000000package-lock=false allow-same-version=true message=v%s inspect-js-get-symbol-description-c6acc43/.nycrc000066400000000000000000000002131473032577000220050ustar00rootroot00000000000000{ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], "exclude": [ "coverage", "test" ] } inspect-js-get-symbol-description-c6acc43/CHANGELOG.md000066400000000000000000000142111473032577000225020ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [v1.1.0](https://github.com/inspect-js/get-symbol-description/compare/v1.0.2...v1.1.0) - 2024-12-17 ### Commits - [New] add types [`b957b65`](https://github.com/inspect-js/get-symbol-description/commit/b957b65e08bc1a6ac95fa5ab769ec241b9cac885) - [actions] split out node 10-20, and 20+ [`bfbcae2`](https://github.com/inspect-js/get-symbol-description/commit/bfbcae2ab7224fcf4328bc139ba79445d64030a6) - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, tape` [`197ba80`](https://github.com/inspect-js/get-symbol-description/commit/197ba80ef87153e28f20ec353e8b926ddb145da0) - [Refactor] use `call-bound` directly [`9df4de4`](https://github.com/inspect-js/get-symbol-description/commit/9df4de4e8faae09e84c5ac97ec22b4f010d03fca) - [Deps] update `call-bind`, `get-intrinsic` [`44c1400`](https://github.com/inspect-js/get-symbol-description/commit/44c1400d5088429f6a32a5f81628d9f7270f68ca) - [Dev Deps] update `hasown`, `tape` [`44e2264`](https://github.com/inspect-js/get-symbol-description/commit/44e226470a83e89523bb4898e1ef7a0942e6cb3a) - [Tests] replace `aud` with `npm audit` [`62d9414`](https://github.com/inspect-js/get-symbol-description/commit/62d9414d316f7ba2320cb6fad8d9fd4d8b99c420) - [Deps] update `call-bind` [`396ee27`](https://github.com/inspect-js/get-symbol-description/commit/396ee2763238415c51eec62fbc41bf274c6552b2) - [Dev Deps] add missing peer dep [`cc4b9eb`](https://github.com/inspect-js/get-symbol-description/commit/cc4b9eb527504a49e91f560ee6d9cb942db4e46f) ## [v1.0.2](https://github.com/inspect-js/get-symbol-description/compare/v1.0.1...v1.0.2) - 2024-02-07 ### Fixed - [Deps] add missing `get-intrinsic` [`#3`](https://github.com/inspect-js/get-symbol-description/issues/3) ## [v1.0.1](https://github.com/inspect-js/get-symbol-description/compare/v1.0.0...v1.0.1) - 2024-02-05 ### Commits - [actions] reuse common workflows [`168adf2`](https://github.com/inspect-js/get-symbol-description/commit/168adf213f86e5c69a93b4768a20ad543a70b231) - [meta] use `npmignore` to autogenerate an npmignore file [`fa3b323`](https://github.com/inspect-js/get-symbol-description/commit/fa3b323f0605cf966a5cef1a103ada46d63e466b) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-value-fixtures`, `foreach`, `object-inspect`, `tape` [`9301b9e`](https://github.com/inspect-js/get-symbol-description/commit/9301b9e274fd9b7544af3d7d437dd254e83095e0) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`a92a011`](https://github.com/inspect-js/get-symbol-description/commit/a92a0119f373fb61c58e3eb1d5fb6b3a3f66f157) - [actions] update rebase action to use reusable workflow [`66cea29`](https://github.com/inspect-js/get-symbol-description/commit/66cea29835bc88ab5e937ccf996ea96409475a0e) - [actions] update codecov uploader [`84079e1`](https://github.com/inspect-js/get-symbol-description/commit/84079e12e1421a79b63757cc3ab9c599e8eecc75) - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`9f298a5`](https://github.com/inspect-js/get-symbol-description/commit/9f298a521e6f8a9b974b6b95e0b3de8aeaf74d9c) - [Dev Deps] use `hasown` instead of `has` [`e993bd6`](https://github.com/inspect-js/get-symbol-description/commit/e993bd62a08a1adc2f75664be99a36e031ecf604) - [Dev Deps] update `aud`, `npmignore`, `tape` [`5044bed`](https://github.com/inspect-js/get-symbol-description/commit/5044bed49a1b2b529b0c92fee0504747fda78147) - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`3923eab`](https://github.com/inspect-js/get-symbol-description/commit/3923eabcf3eb2ddad7dbfd542102c29646dac242) - [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`a24f5c5`](https://github.com/inspect-js/get-symbol-description/commit/a24f5c5f6ddd1f24b22ecdc2546eb9b06924f62a) - [Deps] update `call-bind`, `get-intrinsic` [`accd484`](https://github.com/inspect-js/get-symbol-description/commit/accd484cb970c11fb39eb5ec4301572fa4043e37) - [Dev Deps] update `object-inspect`, `tape` [`6c66623`](https://github.com/inspect-js/get-symbol-description/commit/6c666237114333bcb548e2c9ba6eb4924cb154ad) - [Dev Deps] update `object-inspect`, `tape` [`586dfe3`](https://github.com/inspect-js/get-symbol-description/commit/586dfe35b9b6e7dba3fb7577c5973b7466d101a3) - [Dev Deps] update `@ljharb/eslint-config`, `aud` [`bc8c7e0`](https://github.com/inspect-js/get-symbol-description/commit/bc8c7e0382682164f78b87f41764a0a2e389c435) - [Tests] use `for-each` instead of `foreach` [`ca97918`](https://github.com/inspect-js/get-symbol-description/commit/ca97918eaad4ff1df11fd6f187da60227722dfcd) - [Robustness] cache String slice [`5ce0c56`](https://github.com/inspect-js/get-symbol-description/commit/5ce0c5658224ed5cf5c6775a18ee2ad60c5b7ba8) - [Deps] update `get-intrinsic` [`b656c5c`](https://github.com/inspect-js/get-symbol-description/commit/b656c5c68fbeec35d75a635ca991b61ed004bf54) - [Deps] update `get-intrinsic` [`74cf3b6`](https://github.com/inspect-js/get-symbol-description/commit/74cf3b6525c49998f2c984d350e4d59d7f70794c) - [meta] fix FUNDING.yml [`6cf76c8`](https://github.com/inspect-js/get-symbol-description/commit/6cf76c8c56bf366f767a84e82038db54b508641a) ## v1.0.0 - 2021-08-17 ### Commits - Initial commit: pulled from es-abstract [`6e34a05`](https://github.com/inspect-js/get-symbol-description/commit/6e34a05ef10ce8620078cf4cecbe276c1fc1ae77) - Initial commit [`3862092`](https://github.com/inspect-js/get-symbol-description/commit/3862092248d8ffa071ec90ec39d73e8be14ba6f1) - [meta] do not publish github action workflow files [`9d1e2b9`](https://github.com/inspect-js/get-symbol-description/commit/9d1e2b94dd97664da5d0666985a3695c23f45865) - npm init [`5051b32`](https://github.com/inspect-js/get-symbol-description/commit/5051b3221829f364c44b4d5e9a0c35aab3247f6a) - Only apps should have lockfiles [`b866d1c`](https://github.com/inspect-js/get-symbol-description/commit/b866d1c4b4029277618d968cfb3cbe00f012d1a7) inspect-js-get-symbol-description-c6acc43/LICENSE000066400000000000000000000020531473032577000216770ustar00rootroot00000000000000MIT License Copyright (c) 2021 Inspect JS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. inspect-js-get-symbol-description-c6acc43/README.md000066400000000000000000000037671473032577000221660ustar00rootroot00000000000000# get-symbol-description [![Version Badge][2]][1] [![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][5]][6] [![dev dependency status][7]][8] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![npm badge][11]][1] Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible. ## Example ```js var getSymbolDescription = require('get-symbol-description'); var assert = require('assert'); assert(getSymbolDescription(Symbol()) === undefined); assert(getSymbolDescription(Symbol('')) === ''); // or `undefined`, if in an engine that lacks name inference from concise method assert(getSymbolDescription(Symbol('foo')) === 'foo'); assert(getSymbolDescription(Symbol.iterator) === 'Symbol.iterator'); ``` ## Tests Simply clone the repo, `npm install`, and run `npm test` [1]: https://npmjs.org/package/get-symbol-description [2]: https://versionbadg.es/inspect-js/get-symbol-description.svg [5]: https://david-dm.org/inspect-js/get-symbol-description.svg [6]: https://david-dm.org/inspect-js/get-symbol-description [7]: https://david-dm.org/inspect-js/get-symbol-description/dev-status.svg [8]: https://david-dm.org/inspect-js/get-symbol-description#info=devDependencies [11]: https://nodei.co/npm/get-symbol-description.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/get-symbol-description.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/get-symbol-description.svg [downloads-url]: https://npm-stat.com/charts.html?package=get-symbol-description [codecov-image]: https://codecov.io/gh/inspect-js/get-symbol-description/branch/main/graphs/badge.svg [codecov-url]: https://app.codecov.io/gh/inspect-js/get-symbol-description/ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/get-symbol-description [actions-url]: https://github.com/inspect-js/get-symbol-description/actions inspect-js-get-symbol-description-c6acc43/getInferredName.d.ts000066400000000000000000000002051473032577000245200ustar00rootroot00000000000000declare function getInferredName(key: PropertyKey): string; declare const x: typeof getInferredName | undefined | null; export = x;inspect-js-get-symbol-description-c6acc43/getInferredName.js000066400000000000000000000007321473032577000242710ustar00rootroot00000000000000'use strict'; /** @type {NonNullable | undefined} */ var getInferredName; try { // eslint-disable-next-line no-new-func, no-extra-parens getInferredName = /** @type {NonNullable} */ (Function('s', 'return { [s]() {} }[s].name;')); } catch (e) {} var inferred = function () {}; /** @type {import('./getInferredName')} */ module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null; inspect-js-get-symbol-description-c6acc43/index.d.ts000066400000000000000000000001641473032577000225740ustar00rootroot00000000000000declare function getSymbolDescription(thisArg: symbol | Symbol): string | undefined; export = getSymbolDescription;inspect-js-get-symbol-description-c6acc43/index.js000066400000000000000000000030331473032577000223360ustar00rootroot00000000000000'use strict'; var GetIntrinsic = require('get-intrinsic'); var callBound = require('call-bound'); var $SyntaxError = require('es-errors/syntax'); var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); /** @type {undefined | ((thisArg: symbol | Symbol) => symbol)} */ var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); /** @type {undefined | ((thisArg: symbol | Symbol) => string)} */ var symToStr = callBound('Symbol.prototype.toString', true); /** @type {(thisArg: string, start?: number, end?: number) => string} */ var $strSlice = callBound('String.prototype.slice'); var getInferredName = require('./getInferredName'); /** @type {import('.')} */ /* eslint-disable consistent-return */ module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { if (!thisSymbolValue) { throw new $SyntaxError('Symbols are not supported in this environment'); } // will throw if not a symbol primitive or wrapper object var sym = thisSymbolValue(symbol); if (getInferredName) { var name = getInferredName(sym); if (name === '') { return; } return name.slice(1, -1); // name.slice('['.length, -']'.length); } var desc; if (getGlobalSymbolDescription) { desc = getGlobalSymbolDescription(sym); if (typeof desc === 'string') { return desc; } } // eslint-disable-next-line no-extra-parens desc = $strSlice(/** @type {NonNullable} */ (symToStr)(sym), 7, -1); // str.slice('Symbol('.length, -')'.length); if (desc) { return desc; } }; inspect-js-get-symbol-description-c6acc43/package.json000066400000000000000000000046711473032577000231700ustar00rootroot00000000000000{ "name": "get-symbol-description", "version": "1.1.0", "description": "Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.", "main": "index.js", "exports": { ".": "./index.js", "./getInferredName": "./getInferredName.js", "./package.json": "./package.json" }, "scripts": { "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "prelint": "evalmd README.md", "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", "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/inspect-js/get-symbol-description.git" }, "keywords": [ "symbol", "ecmascript", "javascript", "description" ], "author": "Jordan Harband ", "funding": { "url": "https://github.com/sponsors/ljharb" }, "license": "MIT", "bugs": { "url": "https://github.com/inspect-js/get-symbol-description/issues" }, "homepage": "https://github.com/inspect-js/get-symbol-description#readme", "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6" }, "devDependencies": { "@arethetypeswrong/cli": "^0.17.1", "@ljharb/eslint-config": "^21.1.1", "@ljharb/tsconfig": "^0.2.2", "@types/for-each": "^0.3.3", "@types/get-intrinsic": "^1.2.3", "@types/object-inspect": "^1.13.0", "@types/tape": "^5.7.0", "auto-changelog": "^2.5.0", "encoding": "^0.1.13", "es-value-fixtures": "^1.5.0", "eslint": "=8.8.0", "evalmd": "^0.0.19", "for-each": "^0.3.3", "hasown": "^2.0.2", "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": "^5.8.0-dev.20241216" }, "engines": { "node": ">= 0.4" }, "auto-changelog": { "output": "CHANGELOG.md", "template": "keepachangelog", "unreleased": false, "commitLimit": false, "backfillLimit": false, "hideCredit": true }, "publishConfig": { "ignore": [ ".github/workflows" ] } } inspect-js-get-symbol-description-c6acc43/test/000077500000000000000000000000001473032577000216515ustar00rootroot00000000000000inspect-js-get-symbol-description-c6acc43/test/index.js000066400000000000000000000037171473032577000233260ustar00rootroot00000000000000'use strict'; var test = require('tape'); var debug = require('object-inspect'); var forEach = require('for-each'); var hasOwn = require('hasown'); var v = require('es-value-fixtures'); var getSymbolDescription = require('../'); var getInferredName = require('../getInferredName'); test('getSymbolDescription', function (t) { t.test('no symbols', { skip: v.hasSymbols }, function (st) { st['throws']( // @ts-expect-error getSymbolDescription, SyntaxError, 'requires Symbol support' ); st.end(); }); forEach([].concat( // @ts-expect-error TS sucks with concat v.nonSymbolPrimitives, v.objects ), function (nonSymbol) { t['throws']( function () { getSymbolDescription(nonSymbol); }, v.hasSymbols ? TypeError : SyntaxError, debug(nonSymbol) + ' is not a Symbol' ); }); t.test('with symbols', { skip: !v.hasSymbols }, function (st) { forEach( // eslint-disable-next-line no-extra-parens /** @type {[symbol, undefined | string][]} */ ([ [Symbol(), undefined], [Symbol(undefined), undefined], // @ts-expect-error [Symbol(null), 'null'], [Symbol.iterator, 'Symbol.iterator'], [Symbol('foo'), 'foo'] ]), function (pair) { var sym = pair[0]; var desc = pair[1]; st.equal(getSymbolDescription(sym), desc, debug(sym) + ' description is ' + debug(desc)); } ); st.test('only possible when inference or native `Symbol.prototype.description` is supported', { skip: !getInferredName && !hasOwn(Symbol.prototype, 'description') }, function (s2t) { s2t.equal(getSymbolDescription(Symbol('')), '', 'Symbol("") description is ""'); s2t.end(); }); st.test('only possible when global symbols are supported', { skip: !hasOwn(Symbol, 'for') || !hasOwn(Symbol, 'keyFor') }, function (s2t) { // eslint-disable-next-line no-restricted-properties s2t.equal(getSymbolDescription(Symbol['for']('')), '', 'Symbol.for("") description is ""'); s2t.end(); }); st.end(); }); t.end(); }); inspect-js-get-symbol-description-c6acc43/tsconfig.json000066400000000000000000000001641473032577000234020ustar00rootroot00000000000000{ "extends": "@ljharb/tsconfig", "compilerOptions": { "target": "ES2021", }, "exclude": [ "coverage", ], }