javaScriptToString
— Live Demo
Write a function that returns a value. It will be converted to source code string.
Input — function body
0 chars
Copy
Load example...
Simple Object
Nested Object
Array
Function with Properties
Circular Reference
Cross-Reference
Complex Graph
Mixed Types
Options — IJ2SOptions
Reset
includeFunctionProperties
Include function's own properties
includeFunctionPrototype
Include function's prototype properties
includeBuffers
Include ArrayBuffer and TypedArray contents
nestedObjectsAmount
Max depth for nested objects
nestedArraysAmount
Max depth for nested arrays
nestedFunctionsAmount
Max depth for nested functions
Convert to String
Clear
Output — javaScriptToString(result)
Copy
Click "Convert to String" to see the result
Verification — eval back to value
The output string will be evaluated back to verify correctness