nl_tokens: Convert a thunk to a promise .
pl_tokens: function thunkToPromise ( thunk ) { return new Promise ( function ( resolve , reject ) { var callback = function ( err , val ) { return ( <mask> ? reject ( err ) : resolve ( val ) ) ; } ; thunk ( callback ) ; } ) ; }