Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lekterable committed May 13, 2020
1 parent 9d70317 commit 37f4544
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# is-regexy ![npm](https://img.shields.io/npm/v/is-regexy) ![Travis (.org)](https://img.shields.io/travis/lekterable/is-regexy) [![codecov](https://codecov.io/gh/lekterable/is-regexy/branch/master/graph/badge.svg)](https://codecov.io/gh/lekterable/is-regexy) [![management: perfekt👌](https://img.shields.io/badge/management-perfekt👌-red.svg?style=flat-square)](https://github.com/lekterable/perfekt)
# is-regexy [![npm](https://img.shields.io/npm/v/is-regexy)](https://www.npmjs.com/package/is-regexy) [![build](https://img.shields.io/travis/lekterable/is-regexy)](https://travis-ci.com/github/lekterable/is-regexy) [![codecov](https://codecov.io/gh/lekterable/is-regexy/branch/master/graph/badge.svg)](https://codecov.io/gh/lekterable/is-regexy) [![management: perfekt👌](https://img.shields.io/badge/management-perfekt👌-red.svg?style=flat-square)](https://github.com/lekterable/perfekt)

A very simple library for checking if given value (Regex object OR string) could be a valid regular expression.

Expand All @@ -7,16 +7,16 @@ Useful when we want to allow users to pass regex patterns as user input.
## Example

```js
const isRegex = require('is-regex') // CommonJS
const isRegexy = require('is-regexy') // CommonJS
// OR
import isRegex from 'is-regex' // ES modules
import isRegexy from 'is-regexy' // ES modules

isRegex('foo') // false
isRegexy('foo') // false

isRegex(/foo/) // true
isRegex(new RegExp('foo')) // true
isRegex('/foo/') // true
isRegex('/foo/ig') // true
isRegexy(/foo/) // true
isRegexy(new RegExp('foo')) // true
isRegexy('/foo/') // true
isRegexy('/foo/ig') // true
isRegexy('/(epic|feat|fix|chore)/DEV-\\d{4}/i') //true
```

Expand Down

0 comments on commit 37f4544

Please sign in to comment.