nl_tokens: / * broken out if you re working with a buffer instead expects a fileInfo object with the fileBuffer property set to your buffer .
pl_tokens: function ( fileInfo , callback ) { if ( ! Buffer . isBuffer ( fileInfo . fileBuffer ) ) { return when . reject ( 'fileBuffer was invalid' ) ; } var that = this ; var allDone = pipeline ( [ function ( ) { return that . _validateCRC ( fileInfo . fileBuffer ) ; } , function ( crcInfo ) { fileInfo . crc = crcInfo ; return that . _readPrefix ( fileInfo . fileBuffer ) ; } , function ( prefixInfo ) { fileInfo . prefixInfo = prefixInfo ; return that . _readSuffix ( fileInfo . fileBuffer ) ; } , function ( suffixInfo ) { fileInfo . suffixInfo = suffixInfo ; return when . resolve ( ) ; } , function ( ) { return fileInfo ; } ] ) ; if ( callback ) { when ( allDone ) . then ( function ( info ) { callback ( info , null ) ; } , function ( err ) { callback ( null , <mask> ) ; } ) ; } return allDone ; }