npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

re-route

1.0.0

@soldair

npmHomeRepoSnykSocket
Downloads:0
$ npm install re-route
DailyWeeklyMonthlyYearly

re-route

generate regex to match urls with place holder strings. /url/:hi/:foo

generates a regex from a url string. for ////\ sanity

 var re = require('./')
 var matches = '/a/123/---'.match(compile('/a/:b/:c'))
 console.log(matches)

would log this.

 [ '/a/123/---', '123', '---', index: 0, input: '/a/123/---' ]