caoge c760052ff9 机车状态修改 8 meses atrás
..
test c760052ff9 机车状态修改 8 meses atrás
.eslintrc c760052ff9 机车状态修改 8 meses atrás
CHANGELOG.md c760052ff9 机车状态修改 8 meses atrás
LICENSE c760052ff9 机车状态修改 8 meses atrás
README.md c760052ff9 机车状态修改 8 meses atrás
index.js c760052ff9 机车状态修改 8 meses atrás
package.json c760052ff9 机车状态修改 8 meses atrás

README.md

es-set-tostringtag Version Badge

github actions coverage License Downloads

npm badge

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