Skip to content

Commit

Permalink
feat: add checking functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
lekterable committed Apr 17, 2020
1 parent c31c0ae commit aceecbd
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = () => {
console.log('Init')
}
const isRegex = require('is-regex')

module.exports = input => isRegex(input) || /^\/.*\/[gimsuy]*$/.test(input)
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "is-regexy",
"version": "1.0.0-alpha",
"description": "Check if a string could be a valid regex expression",
"version": "1.0.0",
"description": "Check if a string could be a regex expression",
"main": "index.js",
"repository": {
"type": "git",
Expand All @@ -21,5 +21,8 @@
"bugs": {
"url": "https://github.com/lekterable/is-regexy/issues"
},
"homepage": "https://github.com/lekterable/is-regexy#readme"
"homepage": "https://github.com/lekterable/is-regexy#readme",
"dependencies": {
"is-regex": "^1.0.5"
}
}

0 comments on commit aceecbd

Please sign in to comment.