@splidejs/splide
Version:
Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.
13 lines (12 loc) • 365 B
text/typescript
/**
* Checks if the array includes the value or not.
* `Array#includes` is not supported by IE.
*
* @param array - An array.
* @param value - A value to search for.
*
* @return `true` if the array includes the value, or otherwise `false`.
*/
export function includes<T>( array: T[], value: T ): boolean {
return array.indexOf( value ) > -1;
}