EOL opensource library
Description: JavaScript newline conversion library

## methods

`eol.auto(text)`
  Normalize text to match the current operating system
  Returns string with line endings normalized accordingly
`eol.crlf(text)`
  Normalize line endings in text to CRLF (Windows, DOS)
  Returns string normalized to \r\n line endings
`eol.lf(text)`
  Normalize line endings in text to LF (Unix, OS X)
  Returns string normalized to \n line endings
`eol.cr(text)`
  Normalize line endings in text to CR (Mac OS)
  Returns string normalized to \r line endings
`eol.dub(text)`
  Generate normalizer that replaces line endings with text
  Returns composed pure function like methods above
  Normalizers are usable as glue to join arrays
`eol.before(text)`
  Add linebreak before text
  Returns string with linebreak added before text
`eol.after(text)`
  Add linebreak after text
  Returns string with linebreak added after text
`eol.match(text)`
  Detect or inspect linebreaks in text
  Returns array of matched linebreaks
`eol.split(text)`
  Split text by newline
  Returns array of lines

## samples

### normalizing

    eol.lf("hello\r\nworld\r\n")
    // "hello\nworld\n"

### remove empty lines

    eol.split(text).filter(line => line).join(eol.lf)

### detect or inspect

    eol.match("hello\nworld\n")
    // ["\n","\n"]

### coercion

    String(eol.lf) // "\n"

    String(eol.cr) // "\r"

    String(eol.crlf) // "\r\n"

### generating normalizers

    let lflf = eol.dub("\n\n")
    lflf("hello\nworld\n")
    // "hello\n\nworld\n\n"