string case

This commit is contained in:
johno
2018-12-13 11:20:28 -06:00
parent dc372e548b
commit 3005efad4e
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -1131,10 +1131,12 @@ declare namespace R {
inc(n: number): number;
/**
* Given a target, this function checks a list for a target and returns a boolean.
* Given a target, this function checks a list or string for a target and returns a boolean.
*/
includes<T>(target: T, list: ReadonlyArray<T>): boolean;
includes<T>(target: T): (list: ReadonlyArray<T>) => boolean;
includes<T>(target: T, list: string): boolean;
includes<T>(target: T): (list: string) => boolean;
/**
* Given a function that generates a key, turns a list of objects into an object indexing the objects
+3 -1
View File
@@ -973,7 +973,9 @@ interface Obj {
() => {
R.includes(8, [1, 8]); // => true
R.includes(10)([1, 2, 3, 4]); // => false
R.includes(10)([2, 3, 5, 8]); // => false
R.includes('ba', 'kiwi'); //=>false
R.includes('ba', 'banana'); //=>true
};
() => {