parse-regexp

0.0.2 • Public • Published

parse-regexp

parse a regexp string. parse(reg_exp.toString()) == reg_exp

<img src=https://secure.travis-ci.org/'Dominic Tarr'/parse-regexp.png?branch=master>

Put RegExps in your config files or, or use them as object keys!

  var rxparse = require('regexp-parse')
  rxparse('/whatever/m')

  => /whatever/m

If you are using this to parse user input I would recommend first passing the regular expression through safe-regex

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    6
  • 0.0.1
    2
  • 0.0.0
    0

Package Sidebar

Install

npm i parse-regexp

Weekly Downloads

8

Version

0.0.2

License

MIT

Last publish

Collaborators

  • nopersonsmodules