src/back/utils/objects.js
function copy(o) {
  expect(arguments).to.have.length(
    1,
    'Invalid argument length when copying an object (it has to be passed ' +
    '1 argument)'
  );

  expect(o).to.be.an(
    'object',
    'Invalid argument "o" when copying an object (it has to be an object)'
  );

  var oCopy = {};

  for (var property in o) {
    oCopy[property] = o[property];
  }

  return oCopy;
}
function copy(o) {
  expect(arguments).to.have.length(
    1,
    'Invalid argument length when copying an object (it has to be passed ' +
    '1 argument)'
  );

  expect(o).to.be.an(
    'object',
    'Invalid argument "o" when copying an object (it has to be an object)'
  );

  var oCopy = {};

  for (var property in o) {
    oCopy[property] = o[property];
  }

  return oCopy;
}
function copy ( o ) { expect ( arguments ) . to . have . length ( 1 , 'Invalid argument length when copying an object (it has to be passed ' + '1 argument)' ) ; expect ( o ) . to . be . an ( 'object' , 'Invalid argument "o" when copying an object (it has to be an object)' ) ; var oCopy = { } ; for ( var property in o ) { oCopy [ property ] = o [ property ] ; } return oCopy ; }
Makes a copy of a given object.
@param {!Object} o The object to be copied.
@returns {Object} The new copy of the given object.
@example
var copy = objects.copy(myObject);
Makes a copy of a given object .