File "slice.ts"

Full path: /home/fsibplc/public_html/sommilito-bank2/splide-4.1.3/src/js/utils/arrayLike/slice/slice.ts
File size: 391 B (391 B bytes)
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

/**
 * The slice method for an array-like object.
 *
 * @param arrayLike - An array-like object.
 * @param start     - Optional. A start index.
 * @param end       - Optional. A end index.
 *
 * @return An array with sliced elements.
 */
export function slice<T>( arrayLike: ArrayLike<T>, start?: number, end?: number ): T[] {
  return Array.prototype.slice.call( arrayLike, start, end );
}