mirror of
https://github.com/flynx/serialize.js.git
synced 2026-06-19 00:49:25 +00:00
added .toVanilla(..) func...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5d0beb3bc7
commit
71d28aabc9
12
README.md
12
README.md
@ -199,6 +199,18 @@ eJSON.parse(<string>, {functions: <functions>})
|
||||
```
|
||||
|
||||
|
||||
### `toVanilla(..)`
|
||||
|
||||
Convert eJSON formatted string to Vanilla JSON string.
|
||||
|
||||
```
|
||||
toVanilla(<eJSON-string>)
|
||||
-> <JSON-string>
|
||||
```
|
||||
|
||||
Note that this will fail on anny data not supported by the Vanilla `JOSN.stringify(..)`.
|
||||
|
||||
|
||||
### `deepCopy(..)`
|
||||
|
||||
Deep-copy an object.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-serialize",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "experimental extended json serializaion...",
|
||||
"main": "serialize.js",
|
||||
"scripts": {
|
||||
|
||||
@ -788,6 +788,15 @@ function(str, options){
|
||||
//---------------------------------------------------------------------
|
||||
// utils...
|
||||
|
||||
|
||||
// NOTE: this will fail on any non-vanilla data...
|
||||
var toVanilla =
|
||||
module.toVanilla =
|
||||
function(str){
|
||||
return JSON.stringify(
|
||||
deserialize(str)) }
|
||||
|
||||
|
||||
var deepCopy =
|
||||
module.deepCopy =
|
||||
function(obj, funcs=true){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user