@jetbrains/websandbox
Version:
A sandbox library for runnung javascript inside HTML5 sandboxed iframe
13 lines (12 loc) • 583 B
TypeScript
type AnyObject = any;
export declare function escapePathPart(pathPart: string): string;
export declare function unescapePathPart(pathPart: string): string;
export declare function splitPath(path: string): string[];
/**
* Extracts object property value by given path. Supports nested and array values: 'foo[0].bar'
* @param {Object} object source object
* @param {string} path path to value
* @return {any | null} value by given path
* */
export declare function propertyByPath<R extends AnyObject, O extends AnyObject = AnyObject>(object: O, path: string): R | null;
export {};