NodeJS fs createReadStream存储回调变量

时间:2018-08-01 07:43:29

标签: javascript node.js stream fs

如何从此函数存储doc变量

IQueryable<MeasureResult> measureResults = ...
IQueryable<int> measureIds = ...

var result = measureIds.Skip(1)        //  = rest of sequence, also: empty if no measureIds
   .Aggregate(

    // first parameter: seed, get FilterIds of first measureId
    // note that seed is empty sequence if there is no first measureId
    measureResults                     
        .Where(measureResult.MeasureId == measureIds.FirstOrDefault())
        .Select(measureResult => measureResult.FilterId),

    // aggregate function: intersection of the previousResult
    // and all FilterIds for the nextMeasureId
    (previousResult, nextMeasureId) => previourResult.Intersect(
        measureResults.Where(measureResult.MeasureId == nextMeasureId)
        .Select(measureResult => measureResult.FilterId));

在此变量SELECT REGEXP_REPLACE(my_column, '(^[A-Z]| |[a-z][A-Z]*|[A-Z]*[a-z])', '') AS Result FROM my_table

function parseDataTypeRTF(path) {
  parseRTF.stream(fs.createReadStream(path), (err, doc) => {
  ...
  }); 
};

我正在使用RTF parser npm module

非常感谢您的帮助!

0 个答案:

没有答案