Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/lookup-by-path > LookupByPath > deleteItem

LookupByPath.deleteItem() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Deletes an item if it exists.

Signature:

deleteItem(query: string, delimeter?: string): boolean;

Parameters

Parameter

Type

Description

query

string

The path to the item to delete

delimeter

string

(Optional) Optional override delimeter for parsing the query

Returns:

boolean

true if the item was found and deleted, false otherwise

Remarks

If the node has children with values, they will be retained.