botbook/node_modules/@sagold/json-pointer/dist/lib/remove.d.ts

11 lines
446 B
TypeScript
Raw Normal View History

2024-09-04 13:13:15 -03:00
import { JsonPointer, JsonPath } from "./types";
/**
* Deletes a value at specified json-pointer from data
* Note: input data is modified
*
* @param data - input data
* @param pointer - location of data to remove
* @param [keepArrayIndices] - if set to `true`, will set array element to undefined (instead of removing it)
*/
export declare function remove<T = any>(data: T, pointer: JsonPointer | JsonPath, keepArrayIndices?: boolean): T;