-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrepl.txt
More file actions
38 lines (30 loc) · 859 Bytes
/
repl.txt
File metadata and controls
38 lines (30 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{{alias}}( key, value )
Revives a JSON-serialized number.
The serialization format for a numberis a number itself
Or can have a object having the following
fields:
- type: value type (float32).
- value: 'NaN' or '+Infinity' or '-Infinity'.
Parameters
----------
key: string
Key.
value: any
Value.
Returns
-------
out: any
Value.
Examples
--------
> var str = '{"type":"float32","value":"NaN"}';
> var out = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} )
NaN
> str = '{"type":"float32","value":"+Infinity"}';
> out = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} )
Infinity
> str = '{"type":"float32","value":"-Infinity"}';
> out = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} )
-Infinity
See Also
--------