@nocobase/utils 0.20.0-alpha.15 → 0.20.0-alpha.17
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/lib/json-templates.js +3 -6
- package/package.json +2 -2
package/lib/json-templates.js
CHANGED
|
@@ -101,14 +101,11 @@ const parseString = (() => {
|
|
|
101
101
|
if (typeof value === "function") {
|
|
102
102
|
value = value();
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
104
|
+
if (str.startsWith("{{") && str.endsWith("}}")) {
|
|
105
105
|
return value;
|
|
106
106
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
if (matches.length === 1 && str.startsWith("{{") && str.endsWith("}}")) {
|
|
111
|
-
return value;
|
|
107
|
+
if (value instanceof Date) {
|
|
108
|
+
value = value.toISOString();
|
|
112
109
|
}
|
|
113
110
|
return result.replace(match, value == null ? "" : value);
|
|
114
111
|
}, str);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/utils",
|
|
3
|
-
"version": "0.20.0-alpha.
|
|
3
|
+
"version": "0.20.0-alpha.17",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"multer": "^1.4.5-lts.1",
|
|
16
16
|
"object-path": "^0.11.8"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "a2460c222bc0b8a3bcb783b5c856499d756efa82"
|
|
19
19
|
}
|