Regular expression for matching TODO statements in a string.
Install with npm
$ npm i todo-regex --save
var regex = require('todo-regex');
Examples
(Any of the following can start with todo
or @todo
and an optional colon)
JavaScript line comments:
var match = '// todo: foo bar baz'.match(regex());
//=> 'foo bar baz'
JavaScript block comments:
var match = '/*\n * @todo one two three\n */'.match(regex());
//=> 'one two three'
HTML comments:
var match = '<!-- todo: foo bar baz -->'.match(regex());
//=> 'foo bar baz'
- copyright-regex: Regex for matching and parsing copyright statements.
- dotfile-regex: Regular expresson for matching dotfiles.
- path-regex: Regular expression for matching the parts of a file path.
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
This file was generated by verb-cli on May 26, 2015.