nl_tokens: An alternative to _ . reduce this method transforms object to a new accumulator object which is the result of running each of its elements through a callback with each callback execution potentially mutating the accumulator object . The callback is bound to thisArg and invoked with four arguments ; ( accumulator value key object ) . Callbacks may exit iteration early by explicitly returning false .
pl_tokens: function transform ( object , callback , accumulator , thisArg ) { var isArr = isArray ( object ) ; <mask> = baseCreateCallback ( callback , thisArg , 4 ) ; if ( accumulator == null ) { if ( isArr ) { accumulator = [ ] ; } else { var ctor = object && object . constructor , proto = ctor && ctor . prototype ; accumulator = createObject ( proto ) ; } } ( isArr ? forEach : forOwn ) ( object , function ( value , index , object ) { return callback ( accumulator , value , index , object ) ; } ) ; return accumulator ; }