regexp-inverse

1.0.0-beta.3 • Public • Published

regexp-inverse Build Status

The inverted version of the native JavaScript RegExp object.

Getting Started

Install the module with: npm install regexp-inverse

var RegExpInverse = require('regexp-inverse');
var regExp = new RegExpInverse('.*');
 
regExp.test('foobar'); # Returns false

Documentation

This is a very simple module, that just reverses the outputs of the JavaScript RegExp object. So if the RegExp object matches something, regexp-inverse doesn't and vice versa.

When you use the exec-method of the object and the original RegExp wouldn't match, regexp-inverse returns an array containing the input text.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2016 Dennis Ploeger
Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i regexp-inverse

Weekly Downloads

0

Version

1.0.0-beta.3

License

none

Last publish

Collaborators

  • ploeger