time-to-botec/squiggle/node_modules/@stdlib/complex/reviver/docs/repl.txt

34 lines
663 B
Plaintext
Raw Normal View History

{{alias}}( key, value )
Revives a JSON-serialized complex number.
The serialization format for complex numbers is an object having the
following fields:
- type: complex number type (e.g., "Complex128", "Complex64")
- re: real component (number)
- im: imaginary component (number)
Parameters
----------
key: string
Key.
value: any
Value.
Returns
-------
out: any
Value or complex number.
Examples
--------
> var str = '{"type":"Complex128","re":5,"im":3}';
> var z = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} )
<Complex128>
See Also
--------