mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-27 07:31:40 +01:00
composer and npm
This commit is contained in:
15
conf/site/node_modules/serialize-javascript/README.md
generated
vendored
15
conf/site/node_modules/serialize-javascript/README.md
generated
vendored
@@ -40,19 +40,20 @@ serialize({
|
||||
bool : true,
|
||||
nil : null,
|
||||
undef: undefined,
|
||||
date: new Date("Thu, 28 Apr 2016 22:02:17 GMT"),
|
||||
map: new Map([['hello', 'world']]),
|
||||
set: new Set([123, 456]),
|
||||
|
||||
fn: function echo(arg) { return arg; },
|
||||
re: /([^\s]+)/g
|
||||
inf : Infinity,
|
||||
date : new Date("Thu, 28 Apr 2016 22:02:17 GMT"),
|
||||
map : new Map([['hello', 'world']]),
|
||||
set : new Set([123, 456]),
|
||||
fn : function echo(arg) { return arg; },
|
||||
re : /([^\s]+)/g,
|
||||
big : BigInt(10),
|
||||
});
|
||||
```
|
||||
|
||||
The above will produce the following string output:
|
||||
|
||||
```js
|
||||
'{"str":"string","num":0,"obj":{"foo":"foo"},"arr":[1,2,3],"bool":true,"nil":null,"undef":undefined,"date":new Date("2016-04-28T22:02:17.000Z"),"map":new Map([["hello","world"]]),"set":new Set([123,456]),"fn":function echo(arg) { return arg; },"re":/([^\s]+)/g}'
|
||||
'{"str":"string","num":0,"obj":{"foo":"foo"},"arr":[1,2,3],"bool":true,"nil":null,"undef":undefined,"inf":Infinity,"date":new Date("2016-04-28T22:02:17.000Z"),"map":new Map([["hello","world"]]),"set":new Set([123,456]),"fn":function echo(arg) { return arg; },"re":new RegExp("([^\\\\s]+)", "g"),"big":BigInt("10")}'
|
||||
```
|
||||
|
||||
Note: to produced a beautified string, you can pass an optional second argument to `serialize()` to define the number of spaces to be used for the indentation.
|
||||
|
||||
Reference in New Issue
Block a user