@thi.ng/arrays
Version:
Array / Arraylike utilities
19 lines • 603 B
TypeScript
/**
* Returns true if the first items of `buf` are the same items as in `needle`.
*
* @remarks
* This means `buf` should have at least the same length as `needle` for this to
* be true.
*
* By default, uses
* [`equiv`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for
* equality checking.
*
* {@link endsWith}
*
* @param buf - array
* @param needle - search value
* @param equiv - equivalence predicate
*/
export declare const startsWith: (buf: ArrayLike<any>, needle: ArrayLike<any>, equiv?: (a: any, b: any) => boolean) => boolean;
//# sourceMappingURL=starts-with.d.ts.map