Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

routington

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

routington - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

lib/define.js

@@ -14,6 +14,4 @@ var Routington = require('./routington')

var frags = route.split('/')
try {
return Define(frags, this)
return Define(route.split('/'), this)
} catch (err) {

@@ -20,0 +18,0 @@ err.route = route

{
"name": "routington",
"description": "Trie-based URL Routing",
"version": "0.1.0",
"version": "0.1.1",
"devDependencies": {

@@ -6,0 +6,0 @@ "mocha": "*",

@@ -58,5 +58,2 @@ ## Routington [![Build Status](https://travis-ci.org/jonathanong/routington.png)](https://travis-ci.org/jonathanong/routington)

Each `node` of `nodes` will always have `node.string === ''`.
URLs are always treated with a trailing `/` by design. __Note: this will be changed in the future__.
You should always name your regular expressions otherwise you can't use the captured value.

@@ -106,3 +103,3 @@ The regular expression is built using `new RegExp('^(' + regex + ')$', 'i')`,

router.get = function (path, handler) {
var node = router.define(path)
var node = router.define(path)[0]
node.GET = node.GET || []

@@ -138,3 +135,3 @@ node.GET.push(handler)

```js
var node = router.define('/:id/:controller')
var node = router.define('/:id/:controller')[0]
node.label = 'controller'

@@ -141,0 +138,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc