mk-pmb

mk-pmb/safe-tostring-pmb-js

String(x) with fallback to Object.prototype.toString.call(x)

JavaScript
0
0
No license

safe‑tostring‑pmb is a tiny Node.js utility that converts any JavaScript value to a readable string: it first uses the built‑in `String()` conversion and, when that fails (e.g., for objects without a prototype or complex error objects), falls back to `Object.prototype.toString.call()`. It’s aimed at developers who need a robust, one‑line “to‑string” helper that gracefully handles edge‑case types such as `null`, `undefined`, symbols, and custom error instances.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies

Support the repos that depend on this repository

Top contributors

mk-pmb's profile
mk-pmb
3 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet