Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2025-02-23 14:47:31 +03:00
parent d448b70c0d
commit 87a033f607

View File

@ -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 })