https://github.com/hex7c0/grunt-safer-regex
detect possibly exponential-time regular expressions
https://github.com/hex7c0/grunt-safer-regex
grunt-plugins nodejs regex regular-expression
Last synced: about 2 months ago
JSON representation
detect possibly exponential-time regular expressions
- Host: GitHub
- URL: https://github.com/hex7c0/grunt-safer-regex
- Owner: hex7c0
- License: gpl-3.0
- Created: 2016-09-18T10:02:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T12:00:08.000Z (about 3 years ago)
- Last Synced: 2025-10-08T23:12:53.859Z (8 months ago)
- Topics: grunt-plugins, nodejs, regex, regular-expression
- Language: JavaScript
- Homepage: https://github.com/hex7c0/grunt-safer-regex
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [grunt-safer-regex](https://github.com/hex7c0/grunt-safer-regex)
[](https://www.npmjs.com/package/grunt-safer-regex)
[](https://travis-ci.org/hex7c0/grunt-safer-regex)
[](https://david-dm.org/hex7c0/grunt-safer-regex)
> Detect possibly exponential-time regular expressions
## Getting Started
This plugin requires Grunt `^1.0.0`
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
npm install grunt-safer-regex --save-dev
```
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-safer-regex');
```
## The "endline" task
### Overview
In your project's Gruntfile, add a section named `safer` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
safer: {
your_target: {
// Target-specific file lists and/or options go here.
}
}
});
```
### Options
#### Custom Options
In this example, search regex inside `tmp` directory.
```js
grunt.initConfig({
custom_options: {
files: {
src: 'tmp/**/*'
}
}
});
```
### [License GPLv3](LICENSE)