@genkaok/fenom-js 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/compile-ast.d.ts +2 -0
- package/compiler/compile-node.d.ts +2 -0
- package/compiler/compiler.d.ts +2 -0
- package/compiler/evaluate.d.ts +2 -0
- package/compiler/functions.d.ts +9 -0
- package/engine/loader.d.ts +2 -0
- package/engine/renderer.d.ts +8 -0
- package/fenom-js.cjs +1815 -0
- package/fenom-js.cjs.map +1 -0
- package/fenom-js.mjs +1810 -0
- package/fenom-js.mjs.map +1 -0
- package/filters/filters.d.ts +173 -0
- package/index.d.ts +5 -0
- package/lexer/patterns.d.ts +14 -0
- package/lexer/tokenize.d.ts +2 -0
- package/loader/loader.d.ts +2 -0
- package/node.cjs +1838 -0
- package/node.cjs.map +1 -0
- package/node.d.ts +4 -0
- package/node.mjs +1832 -0
- package/node.mjs.map +1 -0
- package/package.json +38 -0
- package/parser/parse-block.d.ts +6 -0
- package/parser/parse-expression.d.ts +2 -0
- package/parser/parse-extends.d.ts +6 -0
- package/parser/parse-for.d.ts +6 -0
- package/parser/parse-if.d.ts +5 -0
- package/parser/parse-switch.d.ts +5 -0
- package/parser/parser.d.ts +3 -0
- package/readme.md +130 -0
- package/types/common.d.ts +18 -0
- package/types/compiler/compile-ast.d.ts +2 -0
- package/types/compiler/compile-node.d.ts +2 -0
- package/types/compiler/compiler.d.ts +2 -0
- package/types/compiler/evaluate.d.ts +2 -0
- package/types/compiler/functions.d.ts +9 -0
- package/types/engine/loader.d.ts +2 -0
- package/types/engine/renderer.d.ts +8 -0
- package/types/expression.d.ts +27 -0
- package/types/filters/filters.d.ts +173 -0
- package/types/index.d.ts +5 -0
- package/types/lexer/patterns.d.ts +14 -0
- package/types/lexer/tokenize.d.ts +2 -0
- package/types/loader/loader.d.ts +2 -0
- package/types/node.d.ts +4 -0
- package/types/parser/parse-block.d.ts +6 -0
- package/types/parser/parse-expression.d.ts +2 -0
- package/types/parser/parse-extends.d.ts +6 -0
- package/types/parser/parse-for.d.ts +6 -0
- package/types/parser/parse-if.d.ts +5 -0
- package/types/parser/parse-switch.d.ts +5 -0
- package/types/parser/parser.d.ts +3 -0
- package/types/token.d.ts +9 -0
- package/types/types/common.d.ts +18 -0
- package/types/types/expression.d.ts +27 -0
- package/types/types/token.d.ts +9 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function contextPath(path: string): string;
|
|
2
|
+
export declare function parseValue(value: string): any;
|
|
3
|
+
export declare function transformExpression(exp: string): string;
|
|
4
|
+
export declare function isVariable(str: string): boolean;
|
|
5
|
+
export declare function warnFilter(name: string, expected: 'array' | 'string' | 'object', fn: (...args: any[]) => any): (...args: any[]) => any;
|
|
6
|
+
export declare function transformCondition(cond: string): string;
|
|
7
|
+
export declare function minifyHTML(html: string): string;
|
|
8
|
+
export declare function getFromContext(path: string, context: any): any;
|
|
9
|
+
export declare function applyFilters(value: any, filterList: string[], context: any, filters: any): any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TemplateLoader } from '../types/common';
|
|
2
|
+
export declare function FenomJs(template: string, options?: {
|
|
3
|
+
context?: Record<string, any>;
|
|
4
|
+
loader?: TemplateLoader;
|
|
5
|
+
minify?: boolean;
|
|
6
|
+
debug?: boolean;
|
|
7
|
+
}): Promise<string>;
|
|
8
|
+
export { filters } from '../filters/filters';
|