![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 39 years ago | 1.7K | |
![]() | LICENSE | 39 years ago | 1.0K | |
![]() | README.md | 39 years ago | 1.8K | |
![]() | index.js | 39 years ago | 738 | |
![]() | package.json | 2 years ago | 2.8K |
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!]');
Simply clone the repo, npm install
, and run npm test