extensions
extensions copied to clipboard
Object extension
blocks
[!NOTE] You might think that JSON extension is enough, however Object extension is way more faster than json extension, as data will not be reparsed. All variables will be converted to JSON string when you save the project.
performance/benchmark[^1]
-
a ~8.4MB file:
-
a json string with length of 200
15x faster.
Miscellaneous
(Read IMPORTANT
part)
[!IMPORTANT] it will be slower to parse/stringify the entire object due to reviver & replacer.
[!IMPORTANT] variable monitor will not work properly, eg it shows
keyvalue
instead of{"key":"value"}
[!IMPORTANT] use Cast Extension or
() to JSON
block to convert it to string.
[!WARNING] this extension overwrites
Map.prototype.toString
.Map._e
(extra utils) were added.
for developers (Map._e extra utils)
- use
Map._e.deepCopy
when you need to modify the content of theMap
. - use
Map._e.shallowCopy
when you only needs to read the content of theMap
. - use
Map._e.fromMapOrString
in set content related blocks.[^2] - use
Map._e.fromArray
when you need to convert array toMap
.
[^1]: Parsing time not counted.
[^2]: This function tries convert a string to Map
if possible.