time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (558B)


      1 
      2 {{alias}}( obj, predicate )
      3     Returns a partial object copy containing properties for which a predicate
      4     returns a truthy value.
      5 
      6     Parameters
      7     ----------
      8     obj: Object
      9         Source object.
     10 
     11     predicate: Function
     12         Predicate function.
     13 
     14     Returns
     15     -------
     16     out: Object
     17         New object.
     18 
     19     Examples
     20     --------
     21     > function predicate( key, value ) {
     22     ...     return ( value > 1 );
     23     ... };
     24     > var obj1 = { 'a': 1, 'b': 2 };
     25     > var obj2 = {{alias}}( obj1, predicate )
     26     { 'b': 2 }
     27 
     28     See Also
     29     --------
     30