boxwood 2.4.0 → 2.4.3
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/LICENSE +1 -1
- package/package.json +3 -3
- package/utilities/hash.js +7 -3
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boxwood",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Compile HTML templates into JS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"benchmark": "2.1.4",
|
|
50
50
|
"c8": "^10.1.3",
|
|
51
|
-
"express": "^5.1
|
|
51
|
+
"express": "^5.2.1",
|
|
52
52
|
"handlebars": "^4.7.8",
|
|
53
|
-
"jsdom": "^
|
|
53
|
+
"jsdom": "^27.2.0",
|
|
54
54
|
"mustache": "^4.2.0",
|
|
55
55
|
"underscore": "^1.13.7"
|
|
56
56
|
},
|
package/utilities/hash.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
if (!global.__boxwood_index__) {
|
|
2
|
+
global.__boxwood_index__ = 0
|
|
3
|
+
}
|
|
4
|
+
|
|
2
5
|
const map = new Map()
|
|
3
6
|
|
|
4
7
|
function createHash(string) {
|
|
5
8
|
if (map.has(string)) {
|
|
6
9
|
return map.get(string)
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
|
|
12
|
+
global.__boxwood_index__++
|
|
13
|
+
const hash = "c" + global.__boxwood_index__
|
|
10
14
|
map.set(string, hash)
|
|
11
15
|
return hash
|
|
12
16
|
}
|