File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- import { trueFunc , falseFunc } from "boolbase" ;
1
+ import boolbase from "boolbase" ;
2
2
3
3
/**
4
4
* Returns a function that checks if an elements index matches the given rule
@@ -34,13 +34,13 @@ export function compile(
34
34
*
35
35
* `b < 0` here as we subtracted 1 from `b` above.
36
36
*/
37
- if ( b < 0 && a <= 0 ) return falseFunc ;
37
+ if ( b < 0 && a <= 0 ) return boolbase . falseFunc ;
38
38
39
39
// When `a` is in the range -1..1, it matches any element (so only `b` is checked).
40
40
if ( a === - 1 ) return ( index ) => index <= b ;
41
41
if ( a === 0 ) return ( index ) => index === b ;
42
42
// When `b <= 0` and `a === 1`, they match any element.
43
- if ( a === 1 ) return b < 0 ? trueFunc : ( index ) => index >= b ;
43
+ if ( a === 1 ) return b < 0 ? boolbase . trueFunc : ( index ) => index >= b ;
44
44
45
45
/*
46
46
* Otherwise, modulo can be used to check if there is a match.
Original file line number Diff line number Diff line change 1
- import { parse } from "./parse" ;
2
- import { compile , generate } from "./compile" ;
1
+ import { parse } from "./parse.js " ;
2
+ import { compile , generate } from "./compile.js " ;
3
3
4
4
export { parse , compile , generate } ;
5
5
You can’t perform that action at this time.
0 commit comments