@monstermann/fn
Version:
A utility library for TypeScript.
20 lines • 477 B
TypeScript
//#region src/string/hasAny.d.ts
/**
* `hasAny(target, source)`
*
* Checks if `target` string contains any of the strings from the `source` iterable.
*
* ```ts
* hasAny("hello world", ["foo", "world"]); // true
* ```
*
* ```ts
* pipe("hello world", hasAny(["foo", "world"])); // true
* ```
*/
declare const hasAny: {
(source: Iterable<string>): (target: string) => boolean;
(target: string, source: Iterable<string>): boolean;
};
//#endregion
export { hasAny };