0.2.1 • Published 8 years ago

newline-regex v0.2.1

Weekly downloads
11,938
License
MIT
Repository
github
Last release
8 years ago

newline-regex

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Regex for newline characters

Install

npm install --save newline-regex

Usage

var newlineRegex = require('newline-regex');

newlineRegex.test('Unix\n');
// => true

newlineRegex.test('Windows\r\n');
// => true

newlineRegex.test('Nothing');
// => false

// newlineRegex.g is the regex with a global identifier
'Unix\n and Windows\r\n'.match(newlineRegex.g).length;
// => 2

Current Newline Characters Supported

  • Unix
  • Windows

LICENSE

MIT

0.2.1

8 years ago

0.2.0

9 years ago

0.1.0

9 years ago