@diotoborg/fugit-at-porro
v5.11.87
Published
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]
Downloads
2,242
Maintainers
Keywords
Readme
@diotoborg/fugit-at-porro
A helper to optimistically set Symbol.toStringTag, when possible.
Most common usage:
var assert = require('assert');
var setToStringTag = require('@diotoborg/fugit-at-porro');
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