json-p3 0.1.0
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.
- package/LICENCE +21 -0
- package/README.md +252 -0
- package/dist/deep_equals.d.ts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/json-p3.cjs.js +2838 -0
- package/dist/json-p3.esm.js +2811 -0
- package/dist/json-p3.iife.js +2843 -0
- package/dist/json-p3.iife.min.js +2 -0
- package/dist/json-p3.iife.min.js.map +1 -0
- package/dist/patch/errors.d.ts +11 -0
- package/dist/patch/index.d.ts +11 -0
- package/dist/patch/patch.d.ts +157 -0
- package/dist/path/environment.d.ts +60 -0
- package/dist/path/errors.d.ts +50 -0
- package/dist/path/expression.d.ts +98 -0
- package/dist/path/functions/count.d.ts +7 -0
- package/dist/path/functions/function.d.ts +26 -0
- package/dist/path/functions/index.d.ts +7 -0
- package/dist/path/functions/length.d.ts +7 -0
- package/dist/path/functions/match.d.ts +24 -0
- package/dist/path/functions/search.d.ts +24 -0
- package/dist/path/functions/value.d.ts +7 -0
- package/dist/path/index.d.ts +46 -0
- package/dist/path/lex.d.ts +65 -0
- package/dist/path/lru_cache.d.ts +10 -0
- package/dist/path/node.d.ts +74 -0
- package/dist/path/parse.d.ts +29 -0
- package/dist/path/path.d.ts +28 -0
- package/dist/path/selectors.d.ts +90 -0
- package/dist/path/token.d.ts +63 -0
- package/dist/path/types.d.ts +21 -0
- package/dist/pointer/errors.d.ts +27 -0
- package/dist/pointer/index.d.ts +24 -0
- package/dist/pointer/pointer.d.ts +75 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +25 -0
- package/package.json +83 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { JSONPathEnvironment } from "./environment";
|
|
2
|
+
import { BooleanLiteral, FilterExpression, FunctionExtension, InfixExpression, NullLiteral, NumberLiteral, PrefixExpression, RelativeQuery, RootQuery, StringLiteral } from "./expression";
|
|
3
|
+
import { BracketedSelection, FilterSelector, IndexSelector, JSONPathSelector, SliceSelector } from "./selectors";
|
|
4
|
+
import { Token, TokenStream } from "./token";
|
|
5
|
+
export declare class Parser {
|
|
6
|
+
readonly environment: JSONPathEnvironment;
|
|
7
|
+
protected tokenMap: Map<string, (stream: TokenStream) => FilterExpression>;
|
|
8
|
+
constructor(environment: JSONPathEnvironment);
|
|
9
|
+
parse(stream: TokenStream): JSONPathSelector[];
|
|
10
|
+
protected parsePath(stream: TokenStream, inFilter?: boolean): JSONPathSelector[];
|
|
11
|
+
protected parseIndex(stream: TokenStream): IndexSelector;
|
|
12
|
+
protected parseSlice(stream: TokenStream): SliceSelector;
|
|
13
|
+
protected parseBracketedSelection(stream: TokenStream): BracketedSelection;
|
|
14
|
+
protected parseFilter(stream: TokenStream): FilterSelector;
|
|
15
|
+
protected parseBoolean(stream: TokenStream): BooleanLiteral;
|
|
16
|
+
protected parseNull(stream: TokenStream): NullLiteral;
|
|
17
|
+
protected parseString(stream: TokenStream): StringLiteral;
|
|
18
|
+
protected parseNumber(stream: TokenStream): NumberLiteral;
|
|
19
|
+
protected parsePrefixExpression(stream: TokenStream): PrefixExpression;
|
|
20
|
+
protected parseInfixExpression(stream: TokenStream, left: FilterExpression): InfixExpression;
|
|
21
|
+
protected parseGroupedExpression(stream: TokenStream): FilterExpression;
|
|
22
|
+
protected parseRootQuery(stream: TokenStream): RootQuery;
|
|
23
|
+
protected parseRelativeQuery(stream: TokenStream): RelativeQuery;
|
|
24
|
+
protected parseFunction(stream: TokenStream): FunctionExtension;
|
|
25
|
+
protected parseFilterExpression(stream: TokenStream, precedence?: number): FilterExpression;
|
|
26
|
+
protected decodeString(token: Token, isName?: boolean): string;
|
|
27
|
+
protected throwForNonSingularQuery(expr: FilterExpression): void;
|
|
28
|
+
protected throwForNonComparableFunction(expr: FilterExpression): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { JSONPathEnvironment } from "./environment";
|
|
2
|
+
import { JSONPathNodeList } from "./node";
|
|
3
|
+
import { JSONPathSelector } from "./selectors";
|
|
4
|
+
import { JSONValue } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare class JSONPath {
|
|
9
|
+
readonly environment: JSONPathEnvironment;
|
|
10
|
+
readonly selectors: JSONPathSelector[];
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param environment -
|
|
14
|
+
* @param selectors -
|
|
15
|
+
*/
|
|
16
|
+
constructor(environment: JSONPathEnvironment, selectors: JSONPathSelector[]);
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param value -
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
query(value: JSONValue): JSONPathNodeList;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
toString(): string;
|
|
27
|
+
singularQuery(): boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { JSONPathEnvironment } from "./environment";
|
|
2
|
+
import { LogicalExpression } from "./expression";
|
|
3
|
+
import { JSONPathNodeList } from "./node";
|
|
4
|
+
import { Token } from "./token";
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all JSONPath segments and selectors.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class JSONPathSelector {
|
|
9
|
+
readonly environment: JSONPathEnvironment;
|
|
10
|
+
readonly token: Token;
|
|
11
|
+
/**
|
|
12
|
+
* @param token - The token at the start of this selector.
|
|
13
|
+
*/
|
|
14
|
+
constructor(environment: JSONPathEnvironment, token: Token);
|
|
15
|
+
/**
|
|
16
|
+
* @param nodes - Nodes matched by preceding selectors.
|
|
17
|
+
*/
|
|
18
|
+
abstract resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
19
|
+
/**
|
|
20
|
+
* Return a canonical string representation of this selector.
|
|
21
|
+
*/
|
|
22
|
+
abstract toString(): string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Shorthand and quoted name selector.
|
|
26
|
+
*/
|
|
27
|
+
export declare class NameSelector extends JSONPathSelector {
|
|
28
|
+
readonly environment: JSONPathEnvironment;
|
|
29
|
+
readonly token: Token;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly shorthand: boolean;
|
|
32
|
+
constructor(environment: JSONPathEnvironment, token: Token, name: string, shorthand: boolean);
|
|
33
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
34
|
+
toString(): string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Array index selector.
|
|
38
|
+
*/
|
|
39
|
+
export declare class IndexSelector extends JSONPathSelector {
|
|
40
|
+
readonly environment: JSONPathEnvironment;
|
|
41
|
+
readonly token: Token;
|
|
42
|
+
readonly index: number;
|
|
43
|
+
constructor(environment: JSONPathEnvironment, token: Token, index: number);
|
|
44
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
45
|
+
toString(): string;
|
|
46
|
+
private normalizedIndex;
|
|
47
|
+
}
|
|
48
|
+
export declare class SliceSelector extends JSONPathSelector {
|
|
49
|
+
readonly environment: JSONPathEnvironment;
|
|
50
|
+
readonly token: Token;
|
|
51
|
+
readonly start?: number | undefined;
|
|
52
|
+
readonly stop?: number | undefined;
|
|
53
|
+
readonly step?: number | undefined;
|
|
54
|
+
constructor(environment: JSONPathEnvironment, token: Token, start?: number | undefined, stop?: number | undefined, step?: number | undefined);
|
|
55
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
56
|
+
toString(): string;
|
|
57
|
+
private checkRange;
|
|
58
|
+
private normalizedIndex;
|
|
59
|
+
private slice;
|
|
60
|
+
}
|
|
61
|
+
export declare class WildcardSelector extends JSONPathSelector {
|
|
62
|
+
readonly environment: JSONPathEnvironment;
|
|
63
|
+
readonly token: Token;
|
|
64
|
+
readonly shorthand: boolean;
|
|
65
|
+
constructor(environment: JSONPathEnvironment, token: Token, shorthand?: boolean);
|
|
66
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
67
|
+
toString(): string;
|
|
68
|
+
}
|
|
69
|
+
export declare class RecursiveDescentSegment extends JSONPathSelector {
|
|
70
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
71
|
+
toString(): string;
|
|
72
|
+
private visit;
|
|
73
|
+
}
|
|
74
|
+
export declare class FilterSelector extends JSONPathSelector {
|
|
75
|
+
readonly environment: JSONPathEnvironment;
|
|
76
|
+
readonly token: Token;
|
|
77
|
+
readonly expression: LogicalExpression;
|
|
78
|
+
constructor(environment: JSONPathEnvironment, token: Token, expression: LogicalExpression);
|
|
79
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
80
|
+
toString(): string;
|
|
81
|
+
}
|
|
82
|
+
export type BracketedSegment = FilterSelector | IndexSelector | NameSelector | SliceSelector | WildcardSelector;
|
|
83
|
+
export declare class BracketedSelection extends JSONPathSelector {
|
|
84
|
+
readonly environment: JSONPathEnvironment;
|
|
85
|
+
readonly token: Token;
|
|
86
|
+
readonly items: BracketedSegment[];
|
|
87
|
+
constructor(environment: JSONPathEnvironment, token: Token, items: BracketedSegment[]);
|
|
88
|
+
resolve(nodes: JSONPathNodeList): JSONPathNodeList;
|
|
89
|
+
toString(): string;
|
|
90
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TokenKind {
|
|
5
|
+
AND = "TOKEN_AND",
|
|
6
|
+
COLON = "TOKEN_COLON",
|
|
7
|
+
COMMA = "TOKEN_COMMA",
|
|
8
|
+
CURRENT = "TOKEN_CURRENT_NODE",
|
|
9
|
+
DDOT = "TOKEN_DDOT",
|
|
10
|
+
DOT = "TOKEN_DOT",
|
|
11
|
+
DOUBLE_QUOTE_STRING = "TOKEN_DOUBLE_QUOTE_STRING",
|
|
12
|
+
EOF = "TOKEN_EOF",
|
|
13
|
+
EQ = "TOKEN_EQ",
|
|
14
|
+
ERROR = "TOKEN_ERROR",
|
|
15
|
+
FALSE = "TOKEN_FALSE",
|
|
16
|
+
FILTER = "TOKEN_FILTER_START",
|
|
17
|
+
FUNCTION = "TOKEN_FUNCTION",
|
|
18
|
+
GE = "TOKEN_GE",
|
|
19
|
+
GT = "TOKEN_GT",
|
|
20
|
+
INDEX = "TOKEN_INDEX",
|
|
21
|
+
LBRACKET = "TOKEN_LBRACKET",
|
|
22
|
+
LE = "TOKEN_LE",
|
|
23
|
+
LG = "TOKEN_LG",
|
|
24
|
+
LPAREN = "TOKEN_LPAREN",
|
|
25
|
+
LT = "TOKEN_LT",
|
|
26
|
+
NAME = "TOKEN_NAME",
|
|
27
|
+
NE = "TOKEN_NE",
|
|
28
|
+
NOT = "TOKEN_NOT",
|
|
29
|
+
NULL = "TOKEN_NULL",
|
|
30
|
+
NUMBER = "NUMBER",
|
|
31
|
+
OR = "TOKEN_OR",
|
|
32
|
+
RBRACKET = "TOKEN_RBRACKET",
|
|
33
|
+
ROOT = "TOKEN_ROOT",
|
|
34
|
+
RPAREN = "TOKEN_RPAREN",
|
|
35
|
+
SINGLE_QUOTE_STRING = "TOKEN_SINGLE_QUOTE_STRING",
|
|
36
|
+
TRUE = "TOKEN_TRUE",
|
|
37
|
+
WILD = "TOKEN_WILD"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare class Token {
|
|
43
|
+
readonly kind: TokenKind;
|
|
44
|
+
readonly value: string;
|
|
45
|
+
readonly index: number;
|
|
46
|
+
readonly input: string;
|
|
47
|
+
constructor(kind: TokenKind, value: string, index: number, input: string);
|
|
48
|
+
}
|
|
49
|
+
export declare const EOF: Token;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export declare class TokenStream {
|
|
54
|
+
#private;
|
|
55
|
+
private tokens;
|
|
56
|
+
constructor(tokens: Token[]);
|
|
57
|
+
get current(): Token;
|
|
58
|
+
get peek(): Token;
|
|
59
|
+
next(): Token;
|
|
60
|
+
backup(): void;
|
|
61
|
+
expect(kind: TokenKind): void;
|
|
62
|
+
expectPeek(kind: TokenKind): void;
|
|
63
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSONValue } from "../types";
|
|
2
|
+
import { JSONPathEnvironment } from "./environment";
|
|
3
|
+
export declare const Nothing: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* ValueType for JSONPath function expression tye system.
|
|
6
|
+
*/
|
|
7
|
+
export type JSONPathValue = JSONValue | typeof Nothing;
|
|
8
|
+
/**
|
|
9
|
+
* Object passed to FilterExpression.evaluate().
|
|
10
|
+
*/
|
|
11
|
+
export type FilterContext = {
|
|
12
|
+
environment: JSONPathEnvironment;
|
|
13
|
+
currentValue: JSONValue;
|
|
14
|
+
rootValue: JSONValue;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A type predicate for an object with a string property.
|
|
18
|
+
*/
|
|
19
|
+
export declare function hasStringKey(value: unknown, key: string): value is {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for all JSON Pointer errors.
|
|
3
|
+
*/
|
|
4
|
+
export declare class JSONPointerError extends Error {
|
|
5
|
+
readonly message: string;
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class JSONPointerResolutionError extends JSONPointerError {
|
|
9
|
+
readonly message: string;
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class JSONPointerIndexError extends JSONPointerResolutionError {
|
|
13
|
+
readonly message: string;
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class JSONPointerKeyError extends JSONPointerResolutionError {
|
|
17
|
+
readonly message: string;
|
|
18
|
+
constructor(message: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class JSONPointerSyntaxError extends JSONPointerError {
|
|
21
|
+
readonly message: string;
|
|
22
|
+
constructor(message: string);
|
|
23
|
+
}
|
|
24
|
+
export declare class JSONPointerTypeError extends JSONPointerResolutionError {
|
|
25
|
+
readonly message: string;
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSONValue } from "../types";
|
|
2
|
+
import { MaybeJSONValue } from "./pointer";
|
|
3
|
+
export { JSONPointer, UNDEFINED } from "./pointer";
|
|
4
|
+
export type { MaybeJSONValue } from "./pointer";
|
|
5
|
+
export { JSONPointerError, JSONPointerResolutionError, JSONPointerIndexError, JSONPointerKeyError, JSONPointerSyntaxError, JSONPointerTypeError, } from "./errors";
|
|
6
|
+
/**
|
|
7
|
+
* Resolve JSON Pointer _pointer_ against JSON-like data _value_.
|
|
8
|
+
*
|
|
9
|
+
* @param pointer - A string representation of a JSON pointer.
|
|
10
|
+
* @param value - The target JSON-like value, possibly loaded using
|
|
11
|
+
* `JSON.parse()`.
|
|
12
|
+
* @param fallback - A default value to return if _value_ has no
|
|
13
|
+
* path matching `pointer`.
|
|
14
|
+
* @returns The value identified by _pointer_ or, if given, the fallback
|
|
15
|
+
* value in the even of a `JSONPointerResolutionError`.
|
|
16
|
+
*
|
|
17
|
+
* @throws {@link JSONPointerResolutionError}
|
|
18
|
+
* If the value pointed to by _pointer_ does not exist in _value_, and
|
|
19
|
+
* no fallback value is given.
|
|
20
|
+
*
|
|
21
|
+
* @throws {@link JSONPointerSyntaxError}
|
|
22
|
+
* If _pointer_ is malformed according to RFC 6901.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolve(pointer: string, value: JSONValue, fallback?: MaybeJSONValue): JSONValue;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { JSONValue } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* The symbol indicating the absence of a JSON value.
|
|
4
|
+
*/
|
|
5
|
+
export declare const UNDEFINED: unique symbol;
|
|
6
|
+
export type MaybeJSONValue = JSONValue | typeof UNDEFINED;
|
|
7
|
+
/**
|
|
8
|
+
* Identify a single value in JSON-like data, as per RFC 6901.
|
|
9
|
+
*/
|
|
10
|
+
export declare class JSONPointer {
|
|
11
|
+
#private;
|
|
12
|
+
tokens: string[];
|
|
13
|
+
/**
|
|
14
|
+
* @param pointer - A string representation of a JSON Pointer.
|
|
15
|
+
*/
|
|
16
|
+
constructor(pointer: string);
|
|
17
|
+
static encode(tokens: string[]): string;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve this pointer against JSON-like data _value_.
|
|
20
|
+
*
|
|
21
|
+
* @param value - The target JSON-like value, possibly loaded using
|
|
22
|
+
* `JSON.parse()`.
|
|
23
|
+
* @param fallback - A default value to return if _value_ has no
|
|
24
|
+
* path matching `pointer`.
|
|
25
|
+
* @returns The value identified by _pointer_ or, if given, the fallback
|
|
26
|
+
* value in the even of a `JSONPointerResolutionError`.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link JSONPointerResolutionError}
|
|
29
|
+
* If the value pointed to by _pointer_ does not exist in _value_, and
|
|
30
|
+
* no fallback value is given.
|
|
31
|
+
*/
|
|
32
|
+
resolve(value: JSONValue, fallback?: MaybeJSONValue): JSONValue;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param value -
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
resolveWithParent(value: JSONValue): [MaybeJSONValue, MaybeJSONValue];
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
toString(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Return _true_ if this pointer points to a child of _pointer_.
|
|
46
|
+
*/
|
|
47
|
+
isRelativeTo(pointer: JSONPointer): boolean;
|
|
48
|
+
protected parse(pointer: string): string[];
|
|
49
|
+
protected getItem(val: JSONValue, token: string, idx: number): JSONValue;
|
|
50
|
+
private _join;
|
|
51
|
+
/**
|
|
52
|
+
* Join this pointer with _tokens_.
|
|
53
|
+
* @param tokens - JSON Pointer strings, possibly without leading slashes.
|
|
54
|
+
* If a token or "part" does have a leading slash, the previous pointer is
|
|
55
|
+
* ignored and a new `JSONPointer` is created, then processing of the
|
|
56
|
+
* remaining tokens continues.
|
|
57
|
+
* @returns A new JSON Pointer that is the concatenation of all tokens or
|
|
58
|
+
* "parts".
|
|
59
|
+
*/
|
|
60
|
+
join(...tokens: string[]): JSONPointer;
|
|
61
|
+
/**
|
|
62
|
+
* Return _true_ if this pointer can be resolved against _value_.
|
|
63
|
+
*
|
|
64
|
+
* Note that `JSONPointer.resolve()` can return legitimate falsy values
|
|
65
|
+
* that form part of the target JSON document. This method will return
|
|
66
|
+
* `true` if a falsy value is found.
|
|
67
|
+
*/
|
|
68
|
+
exists(value: JSONValue): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Return this pointer's parent as a new `JSONPointer`.
|
|
71
|
+
*
|
|
72
|
+
* If this pointer points to the document root, _this_ is returned.
|
|
73
|
+
*/
|
|
74
|
+
parent(): JSONPointer;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/typescript/lib/lib.es2022.full.d.ts","../node_modules/tslib/tslib.d.ts","../src/types.ts","../src/deep_equals.ts","../src/path/token.ts","../src/path/errors.ts","../src/path/functions/function.ts","../src/pointer/errors.ts","../src/pointer/pointer.ts","../src/pointer/index.ts","../src/path/node.ts","../src/path/types.ts","../src/path/selectors.ts","../src/path/path.ts","../src/path/expression.ts","../src/path/functions/count.ts","../src/path/functions/length.ts","../src/path/lru_cache.ts","../src/path/functions/match.ts","../src/path/functions/search.ts","../src/path/functions/value.ts","../src/path/lex.ts","../src/path/parse.ts","../src/path/environment.ts","../src/path/functions/index.ts","../src/path/index.ts","../src/patch/errors.ts","../src/patch/patch.ts","../src/patch/index.ts","../src/index.ts","../node_modules/@jest/expect-utils/build/index.d.ts","../node_modules/chalk/index.d.ts","../node_modules/@sinclair/typebox/typebox.d.ts","../node_modules/@jest/schemas/build/index.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/jest-matcher-utils/build/index.d.ts","../node_modules/expect/build/index.d.ts","../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"1df2366de6650547b3dc1d7c4147355c0f6b4729c964e3839636fa418982d131","7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900",{"version":"e7090a8c9c744185adedc42bfbf2d44ecde699a41bda994df0e0bdf50f1887a3","signature":"8fb971e14ee748882eb39f19c049541c3a5944978f9bfde6b9b6a59cb4e7d03e"},{"version":"4678ace15cff1f5b0d70165cedf9a583c6f5a16a268a63045b4fe9817cfce084","signature":"2513d5bb1f4f9bc86ab56519a27b41445a9f5f060e5d5abe8f8d4b623e7194c0"},{"version":"a1dc8e874322f03d906d42d47ca8643b86cce6622e93edfd37e0c587f4dc2b0b","signature":"0485a2a81426be0d208698398a224e16e895f662f022e308fe39bfcc7d31128e"},{"version":"2ebc841fa819765d0b8aa352563a2fa46c36dc5e8741d90c92d53b190827607a","signature":"ce7208594ea996a770b1d39e2734a8b9b2989ace005077e236236272531e10ea"},{"version":"1656d694529d020456610597d43498686fe3a11e986dc33f1f9457e846e411ff","signature":"96397fcc8549ae1cc26e5380314a772ef519caed2dffd5bb7f670512868d7014"},{"version":"de4620aaea562e0a9eaedf6f1e9a46c67d56ff01791f348fccc3a33dea3baea7","signature":"4081e1bc81bd45021d34ce9d7de258defdde5de3b36f60fb482f14371158a45c"},{"version":"18be2c1b00e8c152bf232f48e4dae92def9396a6baca69ba93b8abe73cf18fdf","signature":"99848e539417643d9c6673baac80d0afcd673943624ba25b5693c3fd08430698"},{"version":"0d1cc6cabb1f59a7e2dfb89576f30536178b3d7ff179bc3fd351cd0265d4098d","signature":"eee0037270aa03773aba075af5afb5a5eead9ed1353062599f5949e7bfe540f9"},{"version":"7498d4fff2ff8951dc04fddf643612313282bdc8c85ba5ab14943a7762e34ec9","signature":"abe9c61138dffc34859df9859caf99fb8e68998907f56c9163dad024df79504d"},{"version":"b63f539330d9c30391b486a6be410e72d6b74c3bc7672fb59c99f34729bf339e","signature":"edbce83912ae8d0bca1dfe4840004b61d68987cc91efcf4dae132559ab6afc18"},{"version":"0d9b951097afe59238fa9a629385125bb03563f4cec0d6de6adbd48aeb9bdee4","signature":"4cde04624571d603d8c2316bd9fc4e80db681828f8433fa65c58c4b3ccf0a072"},{"version":"b7169bcece527e059167f319ea193b0007290c8c404a87efad5d56a58021b353","signature":"0621fedcc635962a2e15e17518c5b35b2c56aff3a32ae89574c8353253ef51c7"},{"version":"0dbe3e0e25a4cb0cda44e78c5d34003a9fe6ae9d13ba3c72d8d8321e1e4abf42","signature":"be61c0eaf607c108530fecb92b4934fed65524a717cff043972e3659e7eeb763"},{"version":"387bcfd3dfe23ce2a90da091e614f34215a2f649195722974cb5f475d9e4d293","signature":"7d049ebd3d8b13384ed983fb766bab9e8f4233223899cf1b47d7bbba308cbc8e"},{"version":"e3af45db67cf30e8891f29fbfb24839da0f0041d8ff2be9a01d367bb72e810f1","signature":"2dee7a558d8833901919cb779f0276f0e3bec45f49b8af10410cd4f4d89b53ed"},{"version":"d07dfddbd00e64ae9f775398c1a2625c515b74ded91c0c4e0bbe461abb5152a3","signature":"e72666ab28f3e60e79c0c7fe4a735dfd9d1dd8a5e494aca59095e1d48afb5329"},{"version":"012c789415f07ead73a95f2f52dd246786773df5fd4d9c24df1d77f722060047","signature":"2bf1ae2d19910febdc6f2ab43dd27613e0295dc82c171338392e9902985a93c7"},{"version":"65be835667a6bd146bf60cd238f1148fc1c5841174e7135d75a4f59a7de3b8fc","signature":"00d01c466ba665becd5848937521885fb00420b4861cd42675b65e29efc9bd0e"},{"version":"6db1a41bb47bede4105120bdd88e7b70d7883e978f19b653e1acdc113d5a0074","signature":"fb9839adb715ca2d59c9bf02229e4430d758bc29d26a83ca5323d3e03b8b9ef7"},{"version":"d353ad801d831218d51593a65d501295f9a10f0536216954596974348525c686","signature":"d4256277876cde4925d92ba74eff45117237d810b85647f1b3382d752ecd0af2"},{"version":"755ff02c8d274c7b7c4d9de62ed4bcbadb27502e56695571747b7ef43a1e5a2f","signature":"4286adfbe91b2459d53040aef6be45137f3e77ff26f45400db39ef500c899011"},{"version":"8e348ec169d68ffc3569f048594ca8d6d30a906a240a30e34439c27e65556cae","signature":"953fa16fc3fc8632b9c75ed73203fd8ea2e6ae586e51f086141c963b8bfc75bd"},"3f80ab14a6fa145abc3560184eb4823522f938f6b7e5eb49a84b34c333633499",{"version":"2c158aff4e57de882029ae5b2fab27f61feadc4b0dd42147380831cadcda9063","signature":"8953a66989ba76d53d7a070588e918e34f03c425a49afd42f1cab1d77fd99c45"},{"version":"67ca17abe3cabfac13df8e108344f54755ecf85e900c71dfd277f7b484d96eff","signature":"e3d508e6cbf8abaf1aee6c0cfda75d1475845a76f1a70f95636e838d3af44895"},{"version":"3936183d360c8fc3e08977104e1866d7947a18a98bd22817a60c71469b8209dc","signature":"ff05986af935e4c0091fdf9e75a8dccde0176dbe4c4b065cfd3ae698d87c1bf1"},{"version":"1b9a44d773153d5e38c5c1a683990694b13a7ca68195ab1b01424f92e7cd62cf","signature":"4a01d0c781217f94ad852ce1cefc50e78202de4be411780edb7a8cae8de4815a"},{"version":"4fce64396f549026894ba4dd5b201f26c00aa6edd9695199d54a5f5cab322a7c","signature":"d7ce18429f2630df0a193e9202501400cfb325309997d47785b14617f30a331a"},"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"b2fdcc3836d425833af10e536ae5491c34e218bc71870f12a401720f874b6ce4","affectsGlobalScope":true}],"root":[[62,89]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"downlevelIteration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"importHelpers":true,"module":1,"noImplicitAny":true,"outDir":"./","removeComments":false,"sourceMap":true,"strict":true,"target":9},"fileIdsList":[[92],[94,97],[90,96],[94],[91,95],[93],[61,62],[61,62,69,85,88],[61],[61,62,86,87],[61,62,63,67,69,86],[61,62,64,65,66,70,73,74,75,76,78,79,80,81,82],[61,64],[61,62,63,64,65,66,70,71,73],[61,66,70],[61,66,75,76,78,79,80],[61,62,66,71],[61,66,77],[61,66,70,71],[61,62,64,65,70,71,72,73,74,83,84],[61,64,65],[61,62,69],[61,64,65,66,72,73,74,83],[61,62,70,72,83],[61,62,64,65,70,71,74,83],[61,65],[61,62,83],[61,62,67,68],[61,62,67],[62,69,85,88],[62,86,87],[62,69],[62,64,66,70,73,74],[64],[64,70,71,73],[66,70],[66,71],[66],[62,64,65,70,71,72,73,74,83,84],[64,72,74,83],[62,70,72,83],[64,70,74,83],[62,83],[62,67,68],[62]],"referencedMap":[[93,1],[98,2],[97,3],[95,4],[96,5],[94,6],[63,7],[89,8],[86,9],[88,10],[87,11],[83,12],[65,13],[74,14],[75,15],[66,9],[84,16],[76,17],[78,18],[79,18],[80,19],[85,20],[81,21],[77,9],[70,22],[82,23],[73,24],[72,25],[64,26],[71,27],[67,9],[69,28],[68,29],[62,9]],"exportedModulesMap":[[93,1],[98,2],[97,3],[95,4],[96,5],[94,6],[89,30],[88,31],[87,32],[83,33],[65,34],[74,35],[75,36],[84,16],[76,37],[78,38],[79,38],[80,36],[85,39],[81,34],[70,32],[82,40],[73,41],[72,42],[71,43],[69,44],[68,45]],"semanticDiagnosticsPerFile":[90,93,92,98,91,97,95,96,94,61,58,59,10,11,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,60,53,54,57,55,56,1,13,12,63,89,86,88,87,83,65,74,75,66,84,76,78,79,80,85,81,77,70,82,73,72,64,71,67,69,68,62]},"version":"5.1.6"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common types and type predicates.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A JSON-like value.
|
|
6
|
+
*/
|
|
7
|
+
export type JSONValue = string | number | null | undefined | boolean | JSONValue[] | {
|
|
8
|
+
[key: string]: JSONValue;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A type predicate for the Array object.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isArray(value: unknown): value is unknown[];
|
|
14
|
+
/**
|
|
15
|
+
* A type predicate for object.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isObject(value: unknown): value is object;
|
|
18
|
+
/**
|
|
19
|
+
* A type predicate for a string primitive.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isString(value: unknown): value is string;
|
|
22
|
+
/**
|
|
23
|
+
* A type predicate for a number primitive.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isNumber(value: unknown): value is string;
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "json-p3",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": "James Prior",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "JSONPath, JSON Pointer and JSON Patch",
|
|
7
|
+
"homepage": "https://github.com/jg-rp/json-p3",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/jg-rp/json-p3/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/jg-rp/json-p3.git"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
18
|
+
"build:js": "rollup -c",
|
|
19
|
+
"build": "npm run build:types && npm run build:js",
|
|
20
|
+
"type-check": "tsc --noEmit",
|
|
21
|
+
"coverage": "jest --collectCoverage",
|
|
22
|
+
"clean": "rm -rf ./lib ./dist ./coverage",
|
|
23
|
+
"lint": "eslint src tests --ext .js,.jsx,.ts,.tsx"
|
|
24
|
+
},
|
|
25
|
+
"browserslist": [
|
|
26
|
+
"defaults",
|
|
27
|
+
"not IE 11",
|
|
28
|
+
"maintained node versions"
|
|
29
|
+
],
|
|
30
|
+
"main": "dist/json-p3.cjs.js",
|
|
31
|
+
"module": "dist/json-p3.esm.js",
|
|
32
|
+
"browser": "dist/json-p3.iife.js",
|
|
33
|
+
"browser-min": "dist/json-p3.iife.min.js",
|
|
34
|
+
"jsdelivr": "dist/json-p3.iife.min.js",
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/**/*"
|
|
38
|
+
],
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/cli": "^7.22.10",
|
|
41
|
+
"@babel/core": "^7.22.10",
|
|
42
|
+
"@babel/preset-env": "^7.22.10",
|
|
43
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
44
|
+
"@jest/globals": "^29.6.3",
|
|
45
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
46
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
48
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
49
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
50
|
+
"@rollup/plugin-typescript": "^11.1.3",
|
|
51
|
+
"@types/jest": "^29.5.3",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
53
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
54
|
+
"eslint": "^8.47.0",
|
|
55
|
+
"eslint-config-prettier": "^9.0.0",
|
|
56
|
+
"eslint-plugin-escompat": "^3.4.0",
|
|
57
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
58
|
+
"eslint-plugin-filenames": "^1.3.2",
|
|
59
|
+
"eslint-plugin-github": "^4.9.2",
|
|
60
|
+
"eslint-plugin-i18n-text": "^1.0.1",
|
|
61
|
+
"eslint-plugin-import": "^2.28.1",
|
|
62
|
+
"eslint-plugin-jsdoc": "^46.5.0",
|
|
63
|
+
"eslint-plugin-n": "^16.0.2",
|
|
64
|
+
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
65
|
+
"eslint-plugin-node": "^11.1.0",
|
|
66
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
67
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
68
|
+
"eslint-plugin-sonarjs": "^0.20.0",
|
|
69
|
+
"eslint-plugin-tsdoc": "^0.2.17",
|
|
70
|
+
"jest": "^29.6.3",
|
|
71
|
+
"prettier": "^3.0.2",
|
|
72
|
+
"rollup": "^3.29.0",
|
|
73
|
+
"ts-jest": "^29.1.1",
|
|
74
|
+
"tslib": "^2.6.2",
|
|
75
|
+
"typescript": "^5.1.6"
|
|
76
|
+
},
|
|
77
|
+
"keywords": [
|
|
78
|
+
"JSON",
|
|
79
|
+
"JSONPath",
|
|
80
|
+
"JSON Pointer",
|
|
81
|
+
"JSON Patch"
|
|
82
|
+
]
|
|
83
|
+
}
|