newline-regex
Regex for newline characters
Last updated 9 years ago by dustinspecker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install newline-regex 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.2.1                                ...           latest (9 years ago)

3 Versions

  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (15)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE