forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.txt
More file actions
45 lines (33 loc) · 1.11 KB
/
repl.txt
File metadata and controls
45 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{alias}}( obj, n, predicate[, thisArg ] )
Tests whether some `own` properties of a provided object
satisfy a predicate function for at least `n` properties.
The predicate function is provided three arguments:
- value: object value.
- key: object key.
- obj: the input object.
The function immediately returns upon finding `n` successful properties.
If provided an empty object, the function returns `false`.
Parameters
----------
obj: Object
Input object over which to iterate.
n: number
Minimum number of successful properties.
predicate: Function
Test function.
thisArg: any (optional)
Execution context.
Returns
-------
bool: boolean
The function returns `true` if an object's own properties satisfy a
predicate for at least `n` properties; otherwise, the function
returns `false`.
Examples
--------
> function negative( v ) { return ( v < 0 ); };
> var obj = { a: 1, b: 2, c: -3, d: 4, e: -1 };
> var bool = {{alias}}( obj, 2, negative )
true
See Also
--------