Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-symbol

inspect-js170.4mMIT1.1.1TypeScript support: included

Determine if a value is an ES6 Symbol or not.

symbol, es6, is, Symbol

readme

is-symbol Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this an ES6 Symbol value?

Example

var isSymbol = require('is-symbol');
assert(!isSymbol(function () {}));
assert(!isSymbol(null));
assert(!isSymbol(function* () { yield 42; return Infinity; });

assert(isSymbol(Symbol.iterator));
assert(isSymbol(Symbol('foo')));
assert(isSymbol(Symbol.for('foo')));
assert(isSymbol(Object(Symbol('foo'))));

Tests

Simply clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.1.1 - 2024-12-12

Commits

  • [actions] re-add finishers 9b9d06f
  • [Deps] update call-bind, has-symbols, safe-regex-test 07f3647
  • [Refactor] use call-bound directly 799402d
  • [Dev Deps] update @arethetypeswrong/cli, @ljharb/tsconfig 4b8b2f9
  • [types] remove unneeded DT packages 398abaa

v1.1.0 - 2024-12-02

Commits

  • [actions] reuse common workflows acf85f0
  • [meta] use npmignore to autogenerate an npmignore file 77c818e
  • [Tests] use for-each and es-value-fixtures 93dfed0
  • [New] add types ed6a057
  • [actions] split out node 10-20, and 20+ 7f81ccc
  • [Robustness] use call-bind and safe-regex-test dc7e142
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, object-inspect, tape 70f87c2
  • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, safe-publish-latest, tape 3f02ff4
  • [Dev Deps] update @ljharb/eslint-config, auto-changelog, has-tostringtag, npmignore, object-inspect, tape 9588872
  • [actions] update rebase action to use reusable workflow 59e2f68
  • [actions] update codecov uploader e4759f8
  • [Dev Deps] update eslint, auto-changelog, object-inspect, tape 33990c0
  • [Tests] use has-tostringtag for more robust Symbol.toStringTag detection d6154e1
  • [Tests] replace aud with npm audit 3215a60
  • [Refactor] avoid an expensive check, for primitives 59f1a42
  • [Deps] update has-symbols 06be1a9
  • [Dev Deps] add missing peer dep 799b0da

v1.0.4 - 2021-05-08

Commits

  • [Tests] migrate tests to Github Actions 997d43c
  • [actions] use node/install instead of node/run; use codecov action fe0ccb7
  • [meta] remove unused Makefile and associated utilities 3ab2748
  • [meta] do not publish github action workflow files f20fafe
  • [Tests] run nyc on all tests 5c332fc
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, object-inspect, tape c5a58a8
  • [readme] fix repo URLs; remove travis badge bcd9258
  • [actions] add "Allow Edits" workflow 33ae2d3
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, tape e53def0
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, object-inspect ae36504
  • [readme] add actions and codecov badges aae7f09
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape d993fae
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 51808a5
  • [Dev Deps] update auto-changelog, tape c90040f
  • [Dev Deps] update eslint, tape 9fee159
  • [meta] use prepublishOnly script for npm 7+ b166afc
  • [meta] gitignore coverage output 4a0fe3a
  • [actions] update workflows fbcbc9e
  • [Dev Deps] update auto-changelog; add aud e66ab98
  • [Deps] update has-symbols 6ce7de5
  • [actions] update rebase action to use checkout v2 1173c79
  • [actions] switch Automatic Rebase workflow to pull_request_target event 94a6348
  • [Tests] only audit prod deps 0692681
  • [meta] do not publish .nvmrc file ed47833

v1.0.3 - 2019-11-20

Commits

  • [Tests] use shared travis-ci configs 034afdd
  • [Tests] remove jscs 0c026a0
  • [meta] add auto-changelog 9a1776b
  • [Tests] up to node v12.10, v11.15, v10.16, v8.16, v6.17 23a6db4
  • [Tests] up to node v11.7, v10.15, v8.15, v6.16 892d92e
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, semver, tape c2e6d6a
  • [readme] fix repo URLs 655c288
  • [actions] add automatic rebasing / merge commit blocking 97b1229
  • [meta] add FUNDING.yml 94c64a3
  • [Dev Deps] update eslint, @ljharb/eslint-config, covert, tape, semver 71ab543
  • [Dev Deps] update eslint, @ljharb/eslint-config, semver, tape c6212f9
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, object-inspect 91bc802
  • [Tests] use npx aud instead of nsp or npm audit with hoops 8cbe69c
  • [Tests] use npm audit instead of nsp 741b51d
  • [meta] add funding field 65b58d1
  • [Deps] update has-symbols 9cb5b2a

v1.0.2 - 2018-09-20

Commits

  • Update eslint, tape, semver; use my personal shared eslint config e86aaea
  • [Tests] on all node minors; improve test matrix 50bc07f
  • [Dev Deps] update tape, jscs, nsp, semver, eslint, @ljharb/eslint-config 45e17bd
  • [Tests] up to node v10.0, v9.11, v8.11, v6.14, v4.9; use nvm install-latest-npm 44402cb
  • [Tests] up to node v8.1, v7.10, v6.11, v4.8; improve matrix; old npm breaks on newer nodes 9047c23
  • Update tape, covert, jscs, semver d57d1ce
  • Add npm run eslint 0d75a66
  • Update eslint 042fb3a
  • [Refactor] use has-symbols and object-inspect 129bc68
  • [Tests] up to node v10.11, v8.12 c1822e8
  • Update tape, jscs, eslint, @ljharb/eslint-config 089d2cf
  • [Tests] up to node v8.4; newer npm breaks on older node 05ce701
  • All grade A-supported node/iojs versions now ship with an npm that understands ^. 241e6a6
  • Test on latest node and io.js versions. 5c8d5de
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp, semver, tape 06047bf
  • [Dev Deps] update jscs, nsp, semver, eslint, @ljharb/eslint-config 9d25dd7
  • [Tests] up to io.js v3.3, node v4.1 ce173bd
  • Update nsp, eslint 29e5214
  • Update semver, eslint 53be884
  • [Dev Deps] update eslint, nsp, semver, tape 3bd149c
  • [Dev Deps] update jscs 69b4231
  • Test up to io.js v2.1 0b61ac7
  • [Dev Deps] update tape 5e1b200
  • Only apps should have lockfiles. a191ff5
  • [Dev Deps] update nsp, eslint, @ljharb/eslint-config 97c87ef
  • Test on io.js v2.2 42560e4
  • [Dev Deps] Update tape, eslint 149b2f2
  • [Tests] fix test messages 28bd1ed
  • Test up to io.js v3.0 c0dcc98
  • node now supports Symbols now. d1853ad
  • [Dev Deps] update tape f7a6575
  • Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. aae9c6a
  • Test on io.js v2.4 ab8f449
  • Test on io.js v2.3 58ce871

v1.0.1 - 2015-01-26

Commits

  • Correct package description. f4d15b9

v1.0.0 - 2015-01-24

Commits