nl_tokens: Promisify the given function .
pl_tokens: function promisify ( orig , options ) { if ( typeof orig !== 'function' ) { throw <mask> TypeError ( 'promisify requires a function' ) ; } if ( orig [ kCustomPromisifiedSymbol ] ) { const fn = orig [ kCustomPromisifiedSymbol ] ; if ( typeof fn !== 'function' ) { throw new TypeError ( 'The [util.promisify.custom] property must be a function' ) ; } Object . defineProperty ( fn , kCustomPromisifiedSymbol , { value : fn , enumerable : false , writable : false , configurable : true } ) ; return fn ; } function fn ( ) { const args = toArray ( arguments ) ; return new Promise ( ( resolve , reject ) => { args . push ( callbackBuilder ( resolve , reject , options ) ) ; try { orig . apply ( this , args ) ; } catch ( err ) { reject ( err ) ; } } ) ; } Object . setPrototypeOf ( fn , Object . getPrototypeOf ( orig ) ) ; Object . defineProperty ( fn , kCustomPromisifiedSymbol , { value : fn , enumerable : false , writable : false , configurable : true } ) ; return Object . defineProperties ( fn , getOwnPropertyDescriptors ( orig ) ) ; }