has-regex-chars
v0.1.1
Published
Returns true if a string has regular expression special characters.
Downloads
3
Readme
has-regex-chars
Returns true if a string has regular expression special characters.
Install with npm
npm i has-regex-chars --save
Usage
var hasRegexChars = require('has-regex-chars');
hasRegexChars('$100');
//=> true
// all of the following are `true`
hasRegexChars('(');
hasRegexChars(')');
hasRegexChars('*');
hasRegexChars('+');
hasRegexChars('.');
hasRegexChars('/');
hasRegexChars('?');
hasRegexChars('[');
hasRegexChars('\\');
hasRegexChars(']');
hasRegexChars('^');
hasRegexChars('{');
hasRegexChars('|');
hasRegexChars('}');
Run 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 (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on February 25, 2015.