mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 19:20:56 +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(..)`
|
### `deepCopy(..)`
|
||||||
|
|
||||||
Deep-copy an object.
|
Deep-copy an object.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-serialize",
|
"name": "ig-serialize",
|
||||||
"version": "1.3.3",
|
"version": "1.3.4",
|
||||||
"description": "experimental extended json serializaion...",
|
"description": "experimental extended json serializaion...",
|
||||||
"main": "serialize.js",
|
"main": "serialize.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -788,6 +788,15 @@ function(str, options){
|
|||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// utils...
|
// utils...
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE: this will fail on any non-vanilla data...
|
||||||
|
var toVanilla =
|
||||||
|
module.toVanilla =
|
||||||
|
function(str){
|
||||||
|
return JSON.stringify(
|
||||||
|
deserialize(str)) }
|
||||||
|
|
||||||
|
|
||||||
var deepCopy =
|
var deepCopy =
|
||||||
module.deepCopy =
|
module.deepCopy =
|
||||||
function(obj, funcs=true){
|
function(obj, funcs=true){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user