Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "project/util/jsonUtils"

Index

Type aliases

Variables

Functions

Type aliases

JsonManipulation

JsonManipulation: function

Type declaration

    • (jsonObj: any): void
    • Parameters

      • jsonObj: any

      Returns void

Variables

Const spacePossibilities

spacePossibilities: (string | number)[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, " ", " ", "\t"]

Functions

doWithJson

  • doWithJson<M, P>(p: P, jsonPath: string, manipulation: JsonManipulation): Promise<P>
  • Manipulate the contents of the given JSON file within the project, using its object form and writing back using the same formatting. See the manipulate function.

    Type parameters

    Parameters

    • p: P
    • jsonPath: string

      JSON file path. This function will do nothing without error if the file is ill-formed or not found.

    • manipulation: JsonManipulation

    Returns Promise<P>

manipulate

  • manipulate(jsonIn: string, manipulation: JsonManipulation, context?: string): string
  • Update the object form of the given JSON content and write it back with minimal changes

    Parameters

    • jsonIn: string
    • manipulation: JsonManipulation
    • Default value context: string = ""

    Returns string

Generated using TypeDoc