/** * Creates a shallow clone of the input value. If the value is an array, a new * array is returned, otherwise a new object is returned. * * @since 1.0.0 * * @template T - The type of the input value. * @param {T} value - The value to clone. * @returns {T} - The cloned value. * * @example * * clone([1, 2, 3]); // => [1, 2, 3] * clone({ x: 1, y: 2 }); // => { x: 1, y: 2 } * clone(new Map([['x', 1], ['y', 2]])); // => a new map containing [['x', 1], ['y', 2]] * clone(new Set([1, 2, 3])); // => a new set containing [1, 2, 3] * clone(new RegExp('ab+c', 'i')); // => a new RegExp with the same pattern and flags. * clone(new Date()); // => a new date with the same value. */ declare const clone: (value: T) => T; export default clone;