UNPKG

944 BTypeScriptView Raw
1/**
2 * Returns true, if given `x` is an illegal object key as per
3 * {@link ILLEGAL_KEYS}.
4 *
5 * @remarks
6 * Also see {@link isProtoPath} for more details
7 *
8 * @param x -
9 */
10export declare const isIllegalKey: (x: any) => boolean;
11/**
12 * Returns true if given `path` contains any {@link ILLEGAL_KEYS}, i.e. could be
13 * used to poison the prototype chain of an object.
14 *
15 * @remarks
16 * If given an array, each item is considered a single sub-path property and
17 * will be checked as is. If given a string it will be split using "." as
18 * delimiter and each item checked as is (same way array paths are handled).
19 *
20 * Original discussion here, implementation updated to be more encompassing:
21 * https://github.com/thi-ng/umbrella/pull/273
22 *
23 * Also see {@link isIllegalKey}.
24 *
25 * @param path -
26 */
27export declare const isProtoPath: (path: string | number | readonly (string | number)[]) => boolean;
28//# sourceMappingURL=is-proto-path.d.ts.map
\No newline at end of file