npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

has-regex-chars

0.1.1

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:1
$ npm install has-regex-chars
DailyWeeklyMonthlyYearly

has-regex-chars NPM version

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 25, 2015.