@useoptic/json-pointer-helpers
Advanced tools
Comparing version 0.11.2 to 0.11.3
import * as jsonPointer from 'json-pointer'; | ||
declare function append(pointer: string, ...property: string[]): string; | ||
declare function pop(pointer: string): string; | ||
declare function splitParentChild(pointer: string): [string, string, string]; | ||
declare function unescapeUriSafePointer(inputFromApiToolkit: string): string; | ||
@@ -18,2 +19,3 @@ declare function compile(input: string[]): string; | ||
decode: typeof decode; | ||
splitParentChild: typeof splitParentChild; | ||
unescapeUriSafePointer: typeof unescapeUriSafePointer; | ||
@@ -20,0 +22,0 @@ get: (object: jsonPointer.JsonObject, pointer: string | string[]) => any; |
@@ -45,2 +45,7 @@ "use strict"; | ||
} | ||
function splitParentChild(pointer) { | ||
var parsed = jsonPointer.parse(pointer.toString()) || []; | ||
var key = parsed.pop(); | ||
return [jsonPointer.compile(__spreadArray([], parsed, true)), key || '', pointer]; | ||
} | ||
function unescapeUriSafePointer(inputFromApiToolkit) { | ||
@@ -68,2 +73,3 @@ return decodeURIComponent(inputFromApiToolkit); | ||
decode: decode, | ||
splitParentChild: splitParentChild, | ||
unescapeUriSafePointer: unescapeUriSafePointer, | ||
@@ -70,0 +76,0 @@ get: jsonPointer.get, |
{ | ||
"name": "@useoptic/json-pointer-helpers", | ||
"version": "0.11.2", | ||
"version": "0.11.3", | ||
"packageManager": "yarn@3.0.2", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11568
162