is-equal-regex
Returns true if regular expression A is equal to regex B. Compares the expression and flags.
Install
Install with npm
$ npm i is-equal-regex --save
Usage
var isEqualRegex = ; ;//=> true;//=> true ;//=> false;//=> false
Related projects
- isobject: Returns true if the value is an object and not an array or null.
- is-plain-object: Returns true if an object was created by the
Object
constructor. - is-equal-shallow: Does a shallow comparison of two objects, returning false if the keys or values differ.
Examples
True
All of the following return true
:
;;;;;;;
False
All of the following return false
:
;;;;;;;;;;;;;;;;;;;;;;
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 27, 2015.