Skip to content

Commit c3298ff

Browse files
authored
Merge pull request #4 from finleap-connect/chore/bundle-size
chore: fix issues related to bundle size convert from cjs to esm to enable tree shaking
2 parents d659aa5 + 3570ded commit c3298ff

File tree

252 files changed

+14887
-14878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+14887
-14878
lines changed

.babelrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"presets": ["@babel/preset-env"]
2+
"presets": [
3+
"@babel/preset-env",
4+
{
5+
"modules": false
6+
}
7+
]
38
}

README.md

Lines changed: 1 addition & 1 deletion

lib/conditional/and.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export declare function and(...rest: Array<any>): any;

lib/conditional/cases.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { TPrimitive } from "../types/TPrimitive";
2+
/**
3+
* Takes an expression, and a set of clauses.
4+
* Each clause can take the form of either:
5+
* test-constant result-expr
6+
* (test-constant1 ... test-constantN) result-expr
7+
* The test-constants are not evaluated. They must be compile-time
8+
* literals. If the expression is equal to a
9+
* test-constant, the corresponding result-expr is returned. A single
10+
* default expression can follow the clauses, and its value will be
11+
* returned if no clause matches. If no default expression is provided
12+
* and no clause matches, undefined is returned.
13+
* All manner of constant expressions are acceptable in `cases`,
14+
* including numbers, strings, booleans, and Symbols. The
15+
* test-constants need not be all of the same type.
16+
*/
17+
export declare function cases(expression: TPrimitive, ...rest: any[]): any;

lib/conditional/cond.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export declare const ELSE = "else";
2+
export declare function cond(...rest: Array<any>): any;

lib/conditional/condp.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Takes a binary predicate, an expression, and a set of clauses.
3+
* Each clause can take the form of either:
4+
* test-expr, result-expr
5+
* test-expr, result-fn
6+
* For each clause, (pred test-expr expr) is evaluated. If it returns
7+
* logical true, the clause is a match. If a binary clause matches, the
8+
* result-expr is returned, if a ternary clause matches, its result-fn,
9+
* which must be a unary function, is called with the result of the
10+
* predicate as its argument, the result of that call being the return
11+
* value of condp. A single default expression can follow the clauses,
12+
* and its value will be returned if no clause matches. If no default
13+
* expression is provided and no clause matches, undefined is returned.
14+
* @param {function} pred
15+
* @param {*} expr
16+
* @param {*} rest
17+
* @returns {*}
18+
*/
19+
export declare function condp(pred: any, expr: any, ...rest: any[]): any;

lib/conditional/every-pred.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* @param rest
3+
* @returns {function(...[*]): boolean}
4+
*/
5+
export declare function everyPred(...rest: any[]): (...args: any[]) => boolean;

lib/conditional/if-array.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Returns either the value or an empty Array
3+
* @param {boolean} pred
4+
* @param {*} value
5+
* @returns {*|*[]}
6+
*/
7+
export declare function ifArray(pred: boolean, value: any): any;

lib/conditional/if-blank.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @param {boolean | Function} condition
3+
* @param {*} consequent
4+
* @returns {*|string}
5+
*/
6+
export declare function ifBlank(condition: any, consequent: any): any;

lib/conditional/if-class.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @param {boolean | Function} condition
3+
* @param {string} className
4+
* @returns {*|string}
5+
*/
6+
export declare function ifClass(condition: any, className: any): any;

0 commit comments

Comments
 (0)