Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
644 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Returns a function that checks if an elements index matches the given rule
|
---|
3 | * highly optimized to return the fastest solution.
|
---|
4 | *
|
---|
5 | * @param parsed A tuple [a, b], as returned by `parse`.
|
---|
6 | * @returns A highly optimized function that returns whether an index matches the nth-check.
|
---|
7 | * @example
|
---|
8 | * const check = nthCheck.compile([2, 3]);
|
---|
9 | *
|
---|
10 | * check(0); // `false`
|
---|
11 | * check(1); // `false`
|
---|
12 | * check(2); // `true`
|
---|
13 | * check(3); // `false`
|
---|
14 | * check(4); // `true`
|
---|
15 | * check(5); // `false`
|
---|
16 | * check(6); // `true`
|
---|
17 | */
|
---|
18 | export declare function compile(parsed: [a: number, b: number]): (index: number) => boolean;
|
---|
19 | //# sourceMappingURL=compile.d.ts.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.