detect-line-endings

0.0.2 • Public • Published

detect-line-endings

build status

This is a utility that will return the platform and line ending character for a given string

It returns an object with properties, 'platform' and 'EOL';

var fs = require('fs');
var detect = require('detect-line-endings');
var dos = fs.readFileSync(__dirname+'/dos');
 
assert.equal(dos, {platform: 'dos', EOL: '\r\n'});

Thanks to the work of Wes Mason for his better regular expressions.

/detect-line-endings/

    Package Sidebar

    Install

    npm i detect-line-endings

    Weekly Downloads

    2

    Version

    0.0.2

    License

    BSD

    Last publish

    Collaborators

    • johnkpaul