caoge c760052ff9 机车状态修改 7 months ago
..
test c760052ff9 机车状态修改 7 months ago
.eslintrc c760052ff9 机车状态修改 7 months ago
CHANGELOG.md c760052ff9 机车状态修改 7 months ago
LICENSE c760052ff9 机车状态修改 7 months ago
README.md c760052ff9 机车状态修改 7 months ago
index.js c760052ff9 机车状态修改 7 months ago
package.json c760052ff9 机车状态修改 7 months ago

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