UNPKG

tosource.js

Version:

A polyfill for Mozilla's Object.toSource() method.

7 lines (4 loc) 360 B
toSource.js =========== A polyfill for Mozilla's Object.toSource() method. Returns the equivalent JavaScript source code (not JSON) for a JavaScript Object, Number, Boolean, String, RegExp, Error, Date or Function. See the Mozilla docs for [more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource).