forked from lix-project/lix-website
.. | ||
test | ||
.eslintrc | ||
CHANGELOG.md | ||
index.d.ts | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json |
es-set-tostringtag ![Version Badge](https://versionbadg.es/es-shims/es-set-tostringtag.svg)
A helper to optimistically set Symbol.toStringTag, when possible.
Most common usage:
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