@kosatyi/ejs 0.0.98 → 0.0.99
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/dist/cjs/browser.js +82 -223
- package/dist/cjs/index.js +82 -223
- package/dist/cjs/worker.js +82 -223
- package/dist/esm/browser.js +96 -237
- package/dist/esm/index.js +96 -237
- package/dist/esm/worker.js +96 -237
- package/dist/umd/browser.js +82 -223
- package/dist/umd/browser.min.js +1 -1
- package/dist/umd/index.js +82 -223
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/worker.js +82 -223
- package/dist/umd/worker.min.js +1 -1
- package/package.json +1 -1
- package/types/ejs.d.ts +26 -26
package/types/ejs.d.ts
CHANGED
|
@@ -11,10 +11,12 @@ export interface EJS {
|
|
|
11
11
|
*/
|
|
12
12
|
block(name: string, callback?: Function): any
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
14
|
+
* append rendered template from file
|
|
15
|
+
* @param path
|
|
16
|
+
* @param data
|
|
17
|
+
* @param cx
|
|
16
18
|
*/
|
|
17
|
-
|
|
19
|
+
include(path: string, data?: object, cx?: boolean): any
|
|
18
20
|
/**
|
|
19
21
|
* set property in current scope
|
|
20
22
|
* @param path
|
|
@@ -27,6 +29,24 @@ export interface EJS {
|
|
|
27
29
|
* @param defaults
|
|
28
30
|
*/
|
|
29
31
|
get(path: string, defaults?: any): any
|
|
32
|
+
/**
|
|
33
|
+
* render ejs component
|
|
34
|
+
* @param {string} name
|
|
35
|
+
* @param {object} [props]
|
|
36
|
+
*/
|
|
37
|
+
ui(name: string, props?: object): any
|
|
38
|
+
/**
|
|
39
|
+
* render html element
|
|
40
|
+
* @param {string} tag
|
|
41
|
+
* @param {object} [attrs]
|
|
42
|
+
* @param {any} [content]
|
|
43
|
+
*/
|
|
44
|
+
el(tag: string, attrs?: object, content?: any): any
|
|
45
|
+
/**
|
|
46
|
+
* buffered function execution
|
|
47
|
+
* @param callback
|
|
48
|
+
*/
|
|
49
|
+
fn(callback: Function): any
|
|
30
50
|
/**
|
|
31
51
|
* import macro from file **path** and set to current scope **name** property
|
|
32
52
|
* @param path
|
|
@@ -52,30 +72,11 @@ export interface EJS {
|
|
|
52
72
|
* @param callback
|
|
53
73
|
*/
|
|
54
74
|
async(promise: Promise<any>, callback?: any): any
|
|
55
|
-
/**
|
|
56
|
-
* asynchronous template execution
|
|
57
|
-
* @param callback
|
|
58
|
-
*/
|
|
59
|
-
fn(callback: Function): any
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @param {string} tag
|
|
63
|
-
* @param {object} attrs
|
|
64
|
-
* @param {function} content
|
|
65
|
-
*/
|
|
66
|
-
el(tag: string, attrs?: object, content?: any): any
|
|
67
75
|
/**
|
|
68
76
|
* buffer output
|
|
69
77
|
* @param args
|
|
70
78
|
*/
|
|
71
79
|
echo(...args: any[]): any
|
|
72
|
-
/**
|
|
73
|
-
* append rendered template from file
|
|
74
|
-
* @param path
|
|
75
|
-
* @param data
|
|
76
|
-
* @param cx
|
|
77
|
-
*/
|
|
78
|
-
include(path: string, data?: object, cx?: boolean): any
|
|
79
80
|
/**
|
|
80
81
|
*
|
|
81
82
|
* @param value
|
|
@@ -83,9 +84,8 @@ export interface EJS {
|
|
|
83
84
|
*/
|
|
84
85
|
each(value: any, callback: Function): any
|
|
85
86
|
/**
|
|
86
|
-
*
|
|
87
|
-
* @param
|
|
88
|
-
* @param {object} [props]
|
|
87
|
+
* check if block with `name` exists
|
|
88
|
+
* @param name
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
hasBlock(name: string): boolean
|
|
91
91
|
}
|