Skip to content
Myr

Deprecate leading colon in name for app.param

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #2430

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 0893968 · Browse files · 2 files+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−0 removed

  • other:+7 added−0 removed

2 files+7 added−0 removed

modified:lib/router/index.js+2 added
6 unmodified lines
7var Layer = require('./layer');8var methods = require('methods');9var mixin = require('utils-merge');10var debug = require('debug')('express:router');11var deprecate = require('depd')('express');12var parseUrl = require('parseurl');13var utils = require('../utils');1415/**
78 unmodified lines
94 var len = params.length;95 var ret;9697 if (name[0] === ':') {98 deprecate('name with leading colon: remove leading colon from ' + JSON.stringify(name));99 name = name.substr(1);100 }101102 for (var i = 0; i < len; ++i) {
495 unmodified lines
modified:History.md+5 added
1unreleased2==========34 * Deprecate leading `:` in `name` for `app.param(name, fn)`564.10.8 / 2015-01-137===================89 * Fix crash from error within `OPTIONS` response handler
2545 unmodified lines