uniq-stream

uniq

npm install uniq-stream
2 downloads in the last week
2 downloads in the last month

uniq-stream

Build Status

a stream that acts like uniq

usage

pipe it data and it pipes out de-duped (by line) data

example

var uniq = require('uniq'),
    split = require('split'),
    fs = require('fs')

fs.createReadStream('dupe-ridden-file.txt')
  .pipe(split())
  .pipe(uniq())
  .pipe(fs.createWriteStream('clean-file.txt'))

options

uniq-stream accepts an options object as a first parameter, the acceptable options are outlined below along with their defaults.

{
  global: false, // de-dupe data globally rather than line-wise
  ignoreCase: false, // case insensitive comparison
  skip: 0, // ignore first (value) characters of input string for comparison
  inverse: false // only emit duplicated lines
}

license

MIT

npm loves you