Skip to content

Commit 6004380

Browse files
committed
chore: cleanup
1 parent 98317a6 commit 6004380

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ console.log(pointer); // output: '/my pointer/to/property'
254254
## Breaking Changes
255255

256256
- 2024/04/06 with `v6`, selection of empty properties is supported:
257-
- "/" now selects an empty property (previously root-pointer)
258-
- "a//b" is now a valid pointer to `"a" » "" » "b"`
259-
- `join` no longer removes double slashes when joining `join("/a/", "/b")` » "/a//b"
257+
- `"/"` now selects an empty property (previously root-pointer)
258+
- `"a//b"` is now a valid pointer to `"a" » "" » "b"`
259+
- `join` no longer removes double slashes when joining `join("/a/", "/b")` » `"/a//b"`
260260
- 2022/12/02 with `v5`, package has been renamed to `json-pointer` and published under `@sagold/json-pointer`
261261
- 2020/11/09 with `v4`, `pointer.delete` has been renamed to `remove`

dist/jsonPointer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/join.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,23 @@ describe("pointer.join", () => {
6565
expect(pointer).to.eq("/first/second//third");
6666
});
6767

68-
it("should correctly join trailing empty-property", () => {
68+
it("should correctly join intermediate pointer havgin trailing empty property", () => {
6969
const pointer = join("/a/", "/b");
7070

7171
expect(pointer).to.eq("/a//b");
7272
});
7373

74-
it("should correctly join successive empty-properties", () => {
74+
it("should correctly join successive empty properties", () => {
7575
const pointer = join("/a/", "//b");
7676

7777
expect(pointer).to.eq("/a///b");
7878
});
79+
80+
it("should return with trailing empty property", () => {
81+
const pointer = join("/a", "/b/");
82+
83+
expect(pointer).to.eq("/a/b/");
84+
});
7985
})
8086

8187
it("should resolve relative pointers", () => {

0 commit comments

Comments
 (0)