![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 40 years ago | 1.7K | |
![]() | LICENSE | 40 years ago | 1.0K | |
![]() | README.md | 40 years ago | 1.8K | d7c1522 post receive test [كارل مبارك] |
![]() | index.js | 40 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