Skip to content
Myr

Misc refactoring

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

authored by visionmedia · committed by visionmedia · parent f578437 · Browse files · 1 file+3 added−3 removed
This commit

State

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

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:lib/express/core.js+3 added-3 removed
99 unmodified lines
100 * @return {string}101 * @api public102 */103104function escape(html) {104escape = function(html) {105 if (html instanceof String)106 return html107 .replace(/&/g, '&')108 .replace(/"/g, '"')
10 unmodified lines
119 * @return {array}120 * @api public121 */122123function toArray(arr, offset) {123toArray = function(arr, offset) {124 return Array.prototype.slice.call(arr, offset)125}126127/**
49 unmodified lines
177 * @return {Type}178 * @api public179 */180181function escapeRegexp(string, chars) {181escapeRegexp = function(string, chars) {182 var specials = (chars || '/ . * + ? | ( ) [ ] { } \\').split(' ').join('|\\')183 return string.replace(new RegExp('(\\' + specials + ')', 'g'), '\\$1')184}185
20 unmodified lines