exact-mirror 0.2.0 → 0.2.1
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/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
var import_compiler = require("@sinclair/typebox/compiler");
|
|
31
31
|
var Kind = Symbol.for("TypeBox.Kind");
|
|
32
32
|
var Hint = Symbol.for("TypeBox.Hint");
|
|
33
|
-
var isSpecialProperty = (name) => /(\ |-|\t|\n)/.test(name) || !isNaN(+name[0]);
|
|
33
|
+
var isSpecialProperty = (name) => /(\ |-|\t|\n|\.)/.test(name) || !isNaN(+name[0]);
|
|
34
34
|
var joinProperty = (v1, v2, isOptional = false) => {
|
|
35
35
|
if (typeof v2 === "number") return `${v1}[${v2}]`;
|
|
36
36
|
if (isSpecialProperty(v2)) return `${v1}${isOptional ? "?." : ""}["${v2}"]`;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { TypeCompiler } from "@sinclair/typebox/compiler";
|
|
3
3
|
var Kind = Symbol.for("TypeBox.Kind");
|
|
4
4
|
var Hint = Symbol.for("TypeBox.Hint");
|
|
5
|
-
var isSpecialProperty = (name) => /(\ |-|\t|\n)/.test(name) || !isNaN(+name[0]);
|
|
5
|
+
var isSpecialProperty = (name) => /(\ |-|\t|\n|\.)/.test(name) || !isNaN(+name[0]);
|
|
6
6
|
var joinProperty = (v1, v2, isOptional = false) => {
|
|
7
7
|
if (typeof v2 === "number") return `${v1}[${v2}]`;
|
|
8
8
|
if (isSpecialProperty(v2)) return `${v1}${isOptional ? "?." : ""}["${v2}"]`;
|