Skip to content

Commit aeeb067

Browse files
committed
fix: Fix ESM
1 parent 432ebc6 commit aeeb067

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/compile.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { trueFunc, falseFunc } from "boolbase";
1+
import boolbase from "boolbase";
22

33
/**
44
* Returns a function that checks if an elements index matches the given rule
@@ -34,13 +34,13 @@ export function compile(
3434
*
3535
* `b < 0` here as we subtracted 1 from `b` above.
3636
*/
37-
if (b < 0 && a <= 0) return falseFunc;
37+
if (b < 0 && a <= 0) return boolbase.falseFunc;
3838

3939
// When `a` is in the range -1..1, it matches any element (so only `b` is checked).
4040
if (a === -1) return (index) => index <= b;
4141
if (a === 0) return (index) => index === b;
4242
// 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;
4444

4545
/*
4646
* Otherwise, modulo can be used to check if there is a match.

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { parse } from "./parse";
2-
import { compile, generate } from "./compile";
1+
import { parse } from "./parse.js";
2+
import { compile, generate } from "./compile.js";
33

44
export { parse, compile, generate };
55

0 commit comments

Comments
 (0)