@hyperjump/json-pointer 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -10,6 +10,10 @@ export const pointerSegments = function* (pointer) {
10
10
  throw Error("Invalid JSON Pointer");
11
11
  }
12
12
 
13
+ if (/~(?![01])/.test(pointer)) {
14
+ throw Error("Invalid JSON Pointer");
15
+ }
16
+
13
17
  let segmentStart = 1;
14
18
  let segmentEnd = 0;
15
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperjump/json-pointer",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "An RFC-6901 JSON Pointer implementation",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",