How to use the @stoplight/json.extractPointerFromRef function in @stoplight/json

To help you get started, we’ve selected a few @stoplight/json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stoplightio / spectral / src / utils / refs.ts View on Github external
export const safePointerToPath = (pointer: string): JsonPath => {
  const rawPointer = extractPointerFromRef(pointer);
  return rawPointer ? pointerToPath(rawPointer) : [];
};