Sha256: db15e3599b0c628295221417c086237a92ab2f5053ccc44d5e4519833a89e162

Contents?: true

Size: 1.82 KB

Versions: 50

Compression:

Stored size: 1.82 KB

Contents

# es-set-tostringtag <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

A helper to optimistically set Symbol.toStringTag, when possible.

Most common usage:
```js
var assert = require('assert');
var setToStringTag = require('es-set-tostringtag');

var obj = {};

assert.equal(Object.prototype.toString.call(obj), '[object Object]');

setToStringTag(obj, 'tagged!');

assert.equal(Object.prototype.toString.call(obj), '[object tagged!]');
```

## Tests
Simply clone the repo, `npm install`, and run `npm test`

[package-url]: https://npmjs.com/package/es-set-tostringtag
[npm-version-svg]: https://versionbadg.es/es-shims/es-set-tostringtag.svg
[deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag.svg
[deps-url]: https://david-dm.org/es-shims/es-set-tostringtag
[dev-deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/es-set-tostringtag#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/es-set-tostringtag.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/es-set-tostringtag.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-set-tostringtag.svg
[downloads-url]: https://npm-stat.com/charts.html?package=es-set-tostringtag
[codecov-image]: https://codecov.io/gh/es-shims/es-set-tostringtag/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/es-set-tostringtag/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-set-tostringtag
[actions-url]: https://github.com/es-shims/es-set-tostringtag/actions

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.59 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.58 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.57 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.56 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.55 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.54 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.53 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.52 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.51 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.50 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.49 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.48 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.47 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.46 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.45 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.44 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.43 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.42 node_modules/es-set-tostringtag/README.md
immosquare-cleaner-0.1.41 node_modules/es-set-tostringtag/README.md