Skip to content

Commit 290f6f6

Browse files
committed
Untangle fns and function class imports
1 parent f7cab43 commit 290f6f6

File tree

7 files changed

+132
-92
lines changed

7 files changed

+132
-92
lines changed

src/allFns.js

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import {
2+
$,
3+
add,
4+
and,
5+
cat,
6+
ceil,
7+
div,
8+
eq,
9+
fix,
10+
flr,
11+
get,
12+
gt,
13+
gte,
14+
idx,
15+
is,
16+
join,
17+
len,
18+
low,
19+
lt,
20+
lte,
21+
max,
22+
min,
23+
mul,
24+
not,
25+
or,
26+
pl,
27+
pr,
28+
rnd,
29+
rpl,
30+
rpt,
31+
sbs,
32+
slc,
33+
sub,
34+
trim,
35+
up,
36+
} from './fns';
37+
38+
export const fns = {
39+
$,
40+
add,
41+
and,
42+
cat,
43+
ceil,
44+
div,
45+
eq,
46+
fix,
47+
flr,
48+
get,
49+
gt,
50+
gte,
51+
idx,
52+
is,
53+
join,
54+
len,
55+
low,
56+
lt,
57+
lte,
58+
max,
59+
min,
60+
mul,
61+
not,
62+
or,
63+
pl,
64+
pr,
65+
rnd,
66+
rpl,
67+
rpt,
68+
sbs,
69+
slc,
70+
sub,
71+
trim,
72+
up,
73+
};

src/fns/index.js

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,3 @@
1-
import { $ } from './$';
2-
import { add } from './add';
3-
import { and } from './and';
4-
import { cat } from './cat';
5-
import { ceil } from './ceil';
6-
import { div } from './div';
7-
import { eq } from './eq';
8-
import { fix } from './fix';
9-
import { flr } from './flr';
10-
import { get } from './get';
11-
import { gt } from './gt';
12-
import { gte } from './gte';
13-
import { idx } from './idx';
14-
import { is } from './is';
15-
import { join } from './join';
16-
import { len } from './len';
17-
import { low } from './low';
18-
import { lt } from './lt';
19-
import { lte } from './lte';
20-
import { max } from './max';
21-
import { min } from './min';
22-
import { mul } from './mul';
23-
import { not } from './not';
24-
import { or } from './or';
25-
import { pl } from './pl';
26-
import { pr } from './pr';
27-
import { rnd } from './rnd';
28-
import { rpl } from './rpl';
29-
import { rpt } from './rpt';
30-
import { sbs } from './sbs';
31-
import { slc } from './slc';
32-
import { sub } from './sub';
33-
import { trim } from './trim';
34-
import { up } from './up';
35-
361
export { $ } from './$';
372
export { add } from './add';
383
export { and } from './and';
@@ -67,59 +32,3 @@ export { slc } from './slc';
6732
export { sub } from './sub';
6833
export { trim } from './trim';
6934
export { up } from './up';
70-
71-
export const logicFns = {
72-
and,
73-
eq,
74-
gt,
75-
gte,
76-
is,
77-
lt,
78-
lte,
79-
not,
80-
or,
81-
};
82-
83-
export const numberFns = {
84-
add,
85-
ceil,
86-
div,
87-
flr,
88-
fix,
89-
max,
90-
min,
91-
mul,
92-
rnd,
93-
sub,
94-
};
95-
96-
export const stringFns = {
97-
cat,
98-
idx,
99-
len,
100-
low,
101-
pl,
102-
pr,
103-
rpt,
104-
rpl,
105-
sbs,
106-
slc,
107-
trim,
108-
up,
109-
};
110-
111-
export const utilFns = {
112-
$,
113-
get,
114-
join,
115-
idx,
116-
len,
117-
slc,
118-
};
119-
120-
export const fns = {
121-
...logicFns,
122-
...numberFns,
123-
...stringFns,
124-
...utilFns,
125-
};

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
export * from './fns';
21
export { RSyntaxError } from './constants';
32
export { runty } from './runty';
3+
export { fns } from './allFns';
4+
export { logicFns } from './logicFns';
5+
export { numberFns } from './numberFns';
6+
export { stringFns } from './stringFns';
7+
export { utilFns } from './utilFns';
8+
export * from './fns';

src/logicFns.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { and, eq, gt, gte, is, lt, lte, not, or } from './fns';
2+
3+
export const logicFns = {
4+
and,
5+
eq,
6+
gt,
7+
gte,
8+
is,
9+
lt,
10+
lte,
11+
not,
12+
or,
13+
};

src/numberFns.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { add, ceil, div, fix, flr, max, min, mul, rnd, sub } from './fns';
2+
3+
export const numberFns = {
4+
add,
5+
ceil,
6+
div,
7+
flr,
8+
fix,
9+
max,
10+
min,
11+
mul,
12+
rnd,
13+
sub,
14+
};

src/stringFns.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { cat, idx, len, low, pl, pr, rpl, rpt, sbs, slc, trim, up } from './fns';
2+
3+
export const stringFns = {
4+
cat,
5+
idx,
6+
len,
7+
low,
8+
pl,
9+
pr,
10+
rpt,
11+
rpl,
12+
sbs,
13+
slc,
14+
trim,
15+
up,
16+
};

src/utilFns.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { $, get, idx, join, len, slc } from './fns';
2+
3+
export const utilFns = {
4+
$,
5+
get,
6+
idx,
7+
join,
8+
len,
9+
slc,
10+
};

0 commit comments

Comments
 (0)