/ live.thehmm.nl / back / node_modules / es-set-tostringtag /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]test/2 years ago -  
[TXT]CHANGELOG.md40 years ago1.7K 
[   ]LICENSE40 years ago1.0K 
[TXT]README.md40 years ago1.8Kd7c1522 post receive test [كارل مبارك]
[   ]index.js40 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