Options
All
  • Public
  • Public/Protected
  • All
Menu

json-ptr - v3.0.1

Index

Type aliases

Decoder: (ptr: Pointer) => PathSegments

Type declaration

Dereference: (it: unknown) => unknown

Type declaration

    • (it: unknown): unknown
    • Parameters

      • it: unknown

      Returns unknown

Encoder: (ptr: PathSegments) => Pointer

Type declaration

JsonStringPointer: string
PathSegment: string | number
PathSegments: PathSegment[]
RelativeJsonPointer: string
UriFragmentIdentifierPointer: string
Visitor: (ptr: JsonStringPointer, val: unknown) => void

Type declaration

    • Signature of visitor functions, used with JsonPointer.visit method. Visitors are callbacks invoked for every segment/branch of a target's object graph.

      Tree descent occurs in-order, breadth first.

      Parameters

      Returns void

Functions

  • looksLikeFragment(ptr: string): boolean
  • Parameters

    • ptr: string

    Returns boolean

  • replace(source: string, find: string, repl: string): string
  • Parameters

    • source: string
    • find: string
    • repl: string

    Returns string

  • setValueAtPath(target: unknown, val: unknown, path: PathSegments, force?: boolean): unknown
  • toArrayIndexReference(arr: readonly unknown[], idx: PathSegment): number
  • unsetValueAtPath(target: unknown, path: PathSegments): unknown

Generated using TypeDoc