@budibase/string-templates 2.13.50 → 2.13.52
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/bundle.mjs +1 -1
- package/dist/helpers/list.d.ts +1 -1
- package/package.json +2 -2
- package/src/helpers/list.js +11 -4
package/dist/helpers/list.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export function getHelperList():
|
1
|
+
export function getHelperList(): any;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@budibase/string-templates",
|
3
|
-
"version": "2.13.
|
3
|
+
"version": "2.13.52",
|
4
4
|
"description": "Handlebars wrapper for Budibase templating.",
|
5
5
|
"main": "src/index.cjs",
|
6
6
|
"module": "dist/bundle.mjs",
|
@@ -45,5 +45,5 @@
|
|
45
45
|
"rollup-plugin-terser": "^7.0.2",
|
46
46
|
"typescript": "5.2.2"
|
47
47
|
},
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "7afc8a9d0ca42fdb13b6146f7bb93ecf18023d15"
|
49
49
|
}
|
package/src/helpers/list.js
CHANGED
@@ -1,19 +1,26 @@
|
|
1
1
|
const externalHandlebars = require("./external")
|
2
2
|
const helperList = require("@budibase/handlebars-helpers")
|
3
3
|
|
4
|
+
let helpers = undefined
|
5
|
+
|
4
6
|
module.exports.getHelperList = () => {
|
7
|
+
if (helpers) {
|
8
|
+
return helpers
|
9
|
+
}
|
10
|
+
|
11
|
+
helpers = {}
|
5
12
|
let constructed = []
|
6
13
|
for (let collection of externalHandlebars.externalCollections) {
|
7
14
|
constructed.push(helperList[collection]())
|
8
15
|
}
|
9
|
-
const fullMap = {}
|
10
16
|
for (let collection of constructed) {
|
11
17
|
for (let [key, func] of Object.entries(collection)) {
|
12
|
-
|
18
|
+
helpers[key] = func
|
13
19
|
}
|
14
20
|
}
|
15
21
|
for (let key of Object.keys(externalHandlebars.addedHelpers)) {
|
16
|
-
|
22
|
+
helpers[key] = externalHandlebars.addedHelpers[key]
|
17
23
|
}
|
18
|
-
|
24
|
+
Object.freeze(helpers)
|
25
|
+
return helpers
|
19
26
|
}
|