Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node check text include in file

var fs = require('fs');
var stream = fs.createReadStream(path);
var found = false;

stream.on('data',function(d){
  if(!found) found=!!(''+d).match(content)
});

stream.on('error',function(err){
    then(err, found);
});

stream.on('close',function(err){
    then(err, found);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #check #text #include #file
ADD COMMENT
Topic
Name
6+4 =