mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 11:10:57 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d448b70c0d
commit
87a033f607
13
serialize.js
13
serialize.js
@ -160,8 +160,13 @@ function(str, funcs){
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// colning...
|
||||
// copying/colning...
|
||||
|
||||
// Deep copy an object tree...
|
||||
//
|
||||
// This is similar to JSON.parse(JSON.stringify(..)) but uses deserialize
|
||||
// and serialize.
|
||||
//
|
||||
// NOTE: this will try and reconstruct functions from the input tree,
|
||||
// this will work fine for simple functions but more complex cases
|
||||
// may yield unexpected results -- this is not done to full depth,
|
||||
@ -176,8 +181,9 @@ function(obj){
|
||||
return deserialize(
|
||||
serialize(obj)) }
|
||||
|
||||
// NOTE: this will not recreate functions, rather it will simply reref
|
||||
// functions from the input to the output...
|
||||
|
||||
// This is the same as semiDeepCopy(..) but instead of recreating
|
||||
// functions, it will simply rereference them from the input...
|
||||
var semiDeepCopy =
|
||||
module.semiDeepCopy =
|
||||
function(obj){
|
||||
@ -188,5 +194,6 @@ function(obj){
|
||||
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* vim:set ts=4 sw=4 : */ return module })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user