nl_tokens: * @method [ enumerable ] ( <obj > ) @returns Boolean @short Enumerable methods in the Array package are also available to the Object class . They will perform their normal operations for every property in <obj > . @extra In cases where a callback is used instead of %element index% the callback will instead be passed %key value% . Enumerable methods are also available to extended objects as instance methods .
pl_tokens: function buildEnumerableMethods ( names , mapping ) { extendSimilar ( object , false , false , names , function ( methods , name ) { methods [ name ] = function ( obj , arg1 , arg2 ) { var result , coerced = keysWithCoercion ( obj ) ; result = array . prototype [ name ] . call ( coerced , function ( key ) { if ( mapping ) { return transformArgument ( obj [ key ] , arg1 , obj , [ key , obj [ key ] , obj ] ) ; } else { return multiMatch ( obj [ <mask> ] , arg1 , obj , [ key , obj [ key ] , obj ] ) ; } } , arg2 ) ; if ( isArray ( result ) ) { // The method has returned an array of keys so use this array // to build up the resulting object in the form we want it in. result = result . reduce ( function ( o , key , i ) { o [ key ] = obj [ key ] ; return o ; } , { } ) ; } return result ; } ; } ) ; buildObjectInstanceMethods ( names , Hash ) ; }