# is-symbol

> Determine if a value is an ES6 Symbol or not.

Latest version **1.1.1** (published 2024-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-symbol
pnpm add is-symbol
yarn add is-symbol
bun add is-symbol
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2024-12-13 |
| First published | 2015-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 3 |
| Unpacked size | 26.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | symbol, es6, is, Symbol |

## Links

- npm: https://www.npmjs.com/package/is-symbol
- Repository: https://github.com/inspect-js/is-symbol
- Homepage: https://github.com/inspect-js/is-symbol#readme
- Issues: https://github.com/inspect-js/is-symbol/issues
- Funding: https://github.com/sponsors/ljharb
- npm.io page: https://npm.io/package/is-symbol

## Dependencies (3)

- [call-bound](https://npm.io/package/call-bound.md) ^1.0.2
- [has-symbols](https://npm.io/package/has-symbols.md) ^1.1.0
- [safe-regex-test](https://npm.io/package/safe-regex-test.md) ^1.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2024-12-13
- 1.1.0 — 2024-12-02
- 1.0.4 — 2021-05-08
- 1.0.3 — 2019-11-21
- 1.0.2 — 2018-09-21
- 1.0.1 — 2015-01-26
- 1.0.0 — 2015-01-24

## README

# is-symbol <sup>[![Version Badge][2]][1]</sup>

[![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]

Is this an ES6 Symbol value?

## Example

```js
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`

[1]: https://npmjs.org/package/is-symbol
[2]: https://versionbadg.es/inspect-js/is-symbol.svg
[5]: https://david-dm.org/inspect-js/is-symbol.svg
[6]: https://david-dm.org/inspect-js/is-symbol
[7]: https://david-dm.org/inspect-js/is-symbol/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-symbol#info=devDependencies
[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-symbol.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-symbol.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-symbol
[codecov-image]: https://codecov.io/gh/inspect-js/is-symbol/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-symbol/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-symbol
[actions-url]: https://github.com/inspect-js/is-symbol/actions

---
_Source: https://npm.io/package/is-symbol · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
