src/dictmanager.js
function clone(obj) {
  if (null == obj || "object" != typeof obj)
    return obj;

  if (obj instanceof Object) {
    var copy = {};
    for (var attr in obj) {
      if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
    }
    return copy;
  }

  throw new Error("Unable to copy obj! Its type isn't supported.");
}
function clone(obj) {
  if (null == obj || "object" != typeof obj)
    return obj;

  if (obj instanceof Object) {
    var copy = {};
    for (var attr in obj) {
      if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
    }
    return copy;
  }

  throw new Error("Unable to copy obj! Its type isn't supported.");
}
function clone ( obj ) { if ( null == obj || "object" != typeof obj ) return obj ; if ( obj instanceof Object ) { var copy = { } ; for ( var attr in obj ) { if ( obj . hasOwnProperty ( attr ) ) copy [ attr ] = clone ( obj [ attr ] ) ; } return copy ; } throw new Error ( "Unable to copy obj! Its type isn't supported." ) ; }
Clones a given Object. This leads us to a
more 'immutable' programming.
Clones a given Object . This leads us to a more immutable programming .