/ never-odd-or-even / back / node_modules / es-set-tostringtag /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]test/2 years ago -  
[TXT]CHANGELOG.md39 years ago1.7K 
[   ]LICENSE39 years ago1.0K 
[TXT]README.md39 years ago1.8K 
[   ]index.js39 years ago738  
[   ]package.json2 years ago2.8K 
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

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80