lib/prod.js
// store that result on the vfile.
store that result on the vfile.
store that result on the vfile .
function process(doc, cb) {
    freeze();
    assertParser('process', processor.Parser);
    assertCompiler('process', processor.Compiler);
    if (!cb) {
      return new Promise(executor)
    }
    executor(null, cb);
    function executor(resolve, reject) {
      var file = vfile(doc);
      pipeline.run(processor, {file: file}, done);
      function done(err) {
        if (err) {
          reject(err);
        } else if (resolve) {
          resolve(file);
        } else {
          cb(null, file);
        }
      }
    }
  }
function process ( doc , cb ) { freeze ( ) ; assertParser ( 'process' , processor . Parser ) ; assertCompiler ( 'process' , processor . Compiler ) ; if ( ! cb ) { return new Promise ( executor ) } executor ( null , cb ) ; function executor ( resolve , reject ) { var file = vfile ( doc ) ; pipeline . run ( processor , { file : file } , done ) ; function done ( err ) { if ( err ) { reject ( err ) ; } else if ( resolve ) { resolve ( file ) ; } else { cb ( null , file ) ; } } } }
store that result on the vfile.
store that result on the vfile .