nl_tokens: Simple Promiseify function that takes a Node API and return a version that supports promises . We use promises instead of synchronized functions to make the process less I / O bound and faster . It also simplifies the code .
pl_tokens: function promiseify ( fn ) { return function ( ) { const args = [ ] . <mask> . call ( arguments , 0 ) ; return new Promise ( ( resolve , reject ) => { fn . apply ( this , args . concat ( [ function ( err , value ) { if ( err ) { reject ( err ) ; } else { resolve ( value ) ; } } ] ) ) ; } ) ; } ; }