spelling: characters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref committed 2021-07-13 09:31:31 -04:00
1 parent 724cf7937e
commit 477dfc7300
2 files changed
+2 -2

No files matched your search

@@ -28,7 +28,7 @@ describe("parseJsonPath", () => {
expect(res).toBe(".metadata.labels['kubesphere.io/alias-name']");
});
test("should convert keys with escpaped charatecrs to use indexed notation", () => {
test("should convert keys with escpaped characters to use indexed notation", () => {
const res = parseJsonPath(".metadata.labels.kubesphere\\\"io/alias-name");
expect(res).toBe(".metadata.labels['kubesphere\"io/alias-name']");
+1 -1
View File
@@ -48,7 +48,7 @@ function convertToIndexNotation(key: string, firstItem = false) {
}
return `['${key}']`;
} else { // no illegal chracters found, do not touch
} else { // no illegal characters found, do not touch
const prefix = firstItem ? "" : ".";
return `${prefix}${key}`;