Bluebird .call()
. call ( String methodName , [ any args ... ] ) This is a convenience method for doing: promise . then ( function ( obj ) { return obj [ methodName ] . call ( obj , arg ... ) ; } ) ; For example ( some is a built-in array method): var Promise = require ( "bluebird" ) ; var fs = Promise . promisifyAll ( require ( "fs" ) ) ; var path = require ( "path" ) ; var thisPath = process . argv [ 2 ] || "." ; var now = Date . now ( ) ; fs . readdirAsync ( thisPath ) . map ( function ( fileName ) { return fs . statAsync ( path . join ( thisPath , fileName ) ) ; } ) . call ( "some" , function ( stat ) { return ( now - new Date ( stat . mtime ) ) < 10000 ; } ) . then ( function ( someFilesHaveBeenModifiedLessThanTenSecondsAgo ) { console . log ( someFilesHaveBeenModifiedLessThanTenSecondsAgo ) ; } ) ; Chaining lo-dash or undersco...