Create a shallow copy of an input object containing only the properties
whose keys are specified by a prefix, stripped of that prefix

@param {String} prefix
@param {Object} object
@return {Object}
@api private
198057
function pickPrefix(prefix, object) {
    var length = prefix.length;
    var sub;
    return foldl(
      function(acc, val, key) {
        if (key.substr(0, length) === prefix) {
          sub = key.substr(length);
          acc[sub] = val;
        }
        return acc;
      },
      {},
      object
    );
  }
124686
function raw(obj) {
  const result = {}
  for (const key in obj) {
    const value = obj[key]
    if (value !== null && value !== undefined) {
      result[key] = value.toString()
    }
  }
  return result
}
1307137
function prefixed(obj, property) {
  var prefix;
  var prop;
  var camelProp = property[0].toUpperCase() + property.slice(1);

  var i = 0;
  while (i < VENDOR_PREFIXES.length) {
    prefix = VENDOR_PREFIXES[i];
    prop = (prefix) ? prefix + camelProp : property;

    if (prop in obj) {
      return prop;
    }
    i++;
  }
  return undefined;
}
80305
private static Object copy(Object object) {
        if (object instanceof byte[]) {
            byte[] data = (byte[]) object;
            return Arrays.copyOf(data, data.length);
        }
        return object;
    }

    /**
     * Makes a deep copy of a {@link Map}. Immutable objects in the map will be shared (e.g., integers, strings,
     * immutable messages) and mutable ones will have a copy (e.g., byte arrays, mutable messages).
     *
     * @param <K> the key type
     * @param <V> the value type
     * @param map the map
     * @return the map
     */
    @SuppressWarnings("unchecked")
    static <K, V> Map<K, V> copy(Map<K, V> map) {
        Map<K, V> result = new LinkedHashMap<K, V>();
        for (Map.Entry<K, V> entry : map.entrySet()) {
            result.put(entry.getKey(), (V) copy(entry.getValue()));
        }
1095979
function copyObject(source) {
  var target = {};
  for (var key in source)
    target[key] = source[key];
  return target;
}
502006
function clone(obj) {
    if (Array.isArray(obj)) {
        return obj.map(clone);
    } else if (typeof obj === 'object') {
        var copy = {};
        Object.keys(obj).forEach(function (key) {
            copy[key] = clone(obj[key]);
        });
        return copy;
    }
    return obj;
}
248653
function flattenKeys(obj, /*optional args: */acc, prefix, prev_method) {
    acc = acc || [];
    prefix = prefix || '';
    Object.keys(obj).forEach(function (k) {
        var split = splitURL(k);
        if (typeof obj[k] == 'function') {
            acc.push([prefix + split.url, split.method || prev_method, obj[k]])
        }
        else {
            flattenKeys(obj[k], acc, prefix + split.url, split.method);
        }
    });
    return acc;
}
888609
function clone(object) {
  if (object === null || typeof object != "object") {
    return object;
  }
  const copy = object.constructor();
  for (const attr in object) {
    if (Object.prototype.hasOwnProperty.call(object, attr)) {
      copy[attr] = object[attr];
    }
  }

  return copy;
}
1062732
function _copy_property(opts, key, a, b) {
	debug.assert(opts).is('object');
	debug.assert(key).is('string');
	debug.assert(a).is('object');
	debug.assert(b).is('object');

	a[key] = b[key];

	if(opts.cache && opts.cache._has_cursors && is.obj(b[key]) && b[key].hasOwnProperty('$id')) {
		var f = opts.cache.findCursor(b, key);
		if(f) {
			//debug.log('Expanding cursor...');
			opts.cache.addToCursor(f, a, key);
		}

	}
}
311097
function forOwnDeep(object, callback, prefix) {
    prefix = prefix ? prefix + '.' : '';

    _.forOwn(object, function(value, key) {
        if (_.isString(value)) {
            callback(value, prefix + key);
        } else {
            forOwnDeep(value, callback, prefix + key);
        }
    });
}
227595
function freeze(object) {

	/* retrieve the property names defined on object */
	const propNames = Object.getOwnPropertyNames(object);

	/* recursively freeze properties before freezing self */
	for(const name of propNames) {
		const value = object[name];
		object[name] = value && typeof value === "object" ? freeze(value) : value;
	}

	/* return frozen object */
	return Object.freeze(object);
}
98231
function toEntries(object, properties) {
  return flatten(properties.map(name => {
    const p = descriptorOf(object, name);

    let result = [];

    if (p.get) {
      result.push({ name, value: p.get, kind: 'getter' });
    }
    if (p.set) {
      result.push({ name, value: p.set, kind: 'setter' });
    }
    if (p.value) {
      result.push({ name, value: p.value, kind: 'value' });
    }

    return result;
  }));
}
1202352
def _shallow_copy(self, obj=None, obj_type=None, **kwargs):
        
        if obj is None:
            obj = self._selected_obj.copy()
        if obj_type is None:
            obj_type = self._constructor
        if isinstance(obj, obj_type):
            obj = obj.obj
        for attr in self._attributes:
            if attr not in kwargs:
                kwargs[attr] = getattr(self, attr)
        return obj_type(obj, **kwargs)
1114166
function deepCopy(obj) {
			var ret = {}, key, val;
			for (key in obj) {
				if (obj.hasOwnProperty(key)) {
					val = obj[key];
					if (typeof val === 'object' && val !== null) {
						ret[key] = deepCopy(val);
					} else {
						ret[key] = val;
					}
				}
			}
			return ret;
		}
1241369
function convert(object) {
  return Object.keys(object).reduce((newObj, originalKey) => {
    let originalValue = object[originalKey]
    if (isString(originalValue)) {
      // you're welcome to later code 😺
      originalValue = originalValue.trim()
    }

    // Some properties should never be transformed
    if (includes(propsToIgnore, originalKey)) {
      newObj[originalKey] = originalValue
      return newObj
    }

    const {key, value} = convertProperty(originalKey, originalValue)
    newObj[key] = value
    return newObj
  }, Array.isArray(object) ? [] : {})
}
159305
function cleanUndefinedProperties(obj) {
  var newObj;
  var isArray = false;
  if (typeof obj === 'object' && obj !== null) {
    if (Array.isArray(obj)) {
      newObj = [];
      isArray = true;
    } else {
      newObj = {};
    }
  } else {
    return obj;
  }
  var keys = Object.keys(obj);
  keys.forEach(function (key, i) {
    if (isArray || typeof obj[key] !== 'undefined') {
      newObj[key] = cleanUndefinedProperties(obj[key]);
    }
  });
  return newObj;
}
167267
function prefixKeypath(obj, prefix) {
  const prefixed = {};

  if (!prefix) {
    return obj;
  }

  prefix += '.';

  for (const key in obj) {
    if (hasOwn(obj, key)) {
      prefixed[prefix + key] = obj[key];
    }
  }

  return prefixed;
}