code: function _copy(val) {
      const type = $type(val);
  
      if (type == 'object') {
          val = _extend({}, val, true);
      } else if (type == 'array') {
          val = val.slice(0);
      }
  
      return val;
  }
docs: Clone value to a new instance
  
  @private
  @param {*} val
  @returns {*}