Socket
Socket
Sign inDemoInstall

get-symbol-description

Package Overview
Dependencies
12
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    get-symbol-description

Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.


Version published
Weekly downloads
24M
decreased by-13.95%
Maintainers
1
Install size
233 kB
Created
Weekly downloads
 

Readme

Source

get-symbol-description Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Gets the description of a Symbol. Handles Symbol() vs Symbol('') properly when possible.

Example

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

Keywords

FAQs

Last updated on 07 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc