UNPKG

914 BTypeScriptView Raw
1/**
2 * Executes the provided `callback` once for each enumerable own property in the
3 * object until it finds one where callback returns a falsy value. If such a
4 * property is found, `everyObject` immediately returns false. Otherwise, it
5 * returns true.
6 *
7 * The `callback` is invoked with three arguments:
8 *
9 * - the property value
10 * - the property name
11 * - the object being traversed
12 *
13 * Properties that are added after the call to `everyObject` will not be
14 * visited by `callback`. If the values of existing properties are changed, the
15 * value passed to `callback` will be the value at the time `everyObject`
16 * visits them. Properties that are deleted before being visited are not
17 * visited.
18 */
19declare function everyObject(
20 o: object | null,
21 callback: (value: any, name: string, o: object) => any,
22 context?: any,
23): boolean;
24
25declare namespace everyObject {}
26
27export = everyObject;