function shallowCopy (src, dst) {
    if (angular.isArray(src)) {
      dst = dst || [];

      for (var i = 0, ii = src.length; i < ii; i++) {
        dst[i] = src[i];
      }
    } else if (angular.isObject(src)) {
      dst = dst || {};

      for (var key in src) {
        if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
          dst[key] = src[key];
        }
      }
    }

    return dst || src;
  }
/**
   * Creates a shallow copy of an object, an array or a primitive.
   *
   * Assumes that there are no proto properties for objects.
   */
Creates a shallow copy of an object, an array or a primitive.
Assumes that there are no proto properties for objects.
Creates a shallow copy of an object an array or a primitive . Assumes that there are no proto properties for objects .
function shallowCopy (src, dst) {
    if (angular.isArray(src)) {
      dst = dst || [];
      for (var i = 0, ii = src.length; i < ii; i++) {
        dst[i] = src[i];
      }
    } else if (angular.isObject(src)) {
      dst = dst || {};
      for (var key in src) {
        if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
          dst[key] = src[key];
        }
      }
    }
    return dst || src;
  }
function shallowCopy ( src , dst ) { if ( angular . isArray ( src ) ) { dst = dst || [ ] ; for ( var i = 0 , ii = src . length ; i < ii ; i ++ ) { dst [ i ] = src [ i ] ; } } else if ( angular . isObject ( src ) ) { dst = dst || { } ; for ( var key in src ) { if ( ! ( key . charAt ( 0 ) === '$' && key . charAt ( 1 ) === '$' ) ) { dst [ key ] = src [ key ] ; } } } return dst || src ; }
Creates a shallow copy of an object, an array or a primitive.
Creates a shallow copy of an object an array or a primitive .