UNPKG

solutaaliquid

Version:

common utils for javascript. Utils to get the global scope (browser, webworker & co.). Customizable string escaper. Utilitize for objects. Extension at base javascript api (usefull extention like String.hashcode()).

8 lines (6 loc) 220 B
if (!Map.prototype.toObject) Map.prototype.toObject = function () { const object = {}; for (const [key, value] of this.entries()) object[key] = value instanceof Map ? value.toObject() : value; return object; };