Class: NameSelector
jsonpath.selectors.NameSelector
Shorthand and quoted name selector.
Hierarchy
-
↳
NameSelector
Constructors
constructor
• new NameSelector(environment
, token
, name
, shorthand
): NameSelector
Parameters
Name | Type |
---|---|
environment | JSONPathEnvironment |
token | Token |
name | string |
shorthand | boolean |
Returns
Overrides
Defined in
Properties
environment
• Readonly
environment: JSONPathEnvironment
Inherited from
Defined in
name
• Readonly
name: string
Defined in
shorthand
• Readonly
shorthand: boolean
Defined in
token
• Readonly
token: Token
The token at the start of this selector.
Inherited from
Defined in
Methods
lazyResolve
▸ lazyResolve(nodes
): Generator
<JSONPathNode
, any
, unknown
>
Parameters
Name | Type | Description |
---|---|---|
nodes | Iterable <JSONPathNode > | Nodes matched by preceding selectors. |
Returns
Generator
<JSONPathNode
, any
, unknown
>
Overrides
Defined in
resolve
▸ resolve(nodes
): JSONPathNode
[]
Parameters
Name | Type | Description |
---|---|---|
nodes | JSONPathNode [] | Nodes matched by preceding selectors. |
Returns
Overrides
Defined in
toString
▸ toString(): string
Return a canonical string representation of this selector.
Returns
string