1.0.1 • Published 6 years ago

@range3/match-transform v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

@range3/match-transform

line-by-line stream str.match(regexp)

Install

$ npm install @range3/match-transform

Usage

const fs = require('fs')
const MatchTransform = require('@range3/match-transform')

const matchTransform = new MatchTransform(
  /^.*range3.*$/, // pattern
  // 'utf8' default encoding
)

fs.createReadStream(__filename)
  .pipe(matchTransform)
  .on('match', match => {
    console.log(match)
  })
  .pipe(process.stdout)

License

MIT