lib/express/core.js
“Body” rejected, cruft purged, a simpler route now flows.
2009-11-30 — 2010-06-18 · 200 days · 222 commits · 6 keepers
This core file, born in 2009, diligently handled requests before its removal in 2010, streamlining the Express project with 289 lines of code.
⚰ a62a5d0d Removed old cruft
Last words (289 lines at death)
request.trigger('request', function(err) {
try {
if (err) throw err
if (request.response.finished) return
if (typeof (body = (new Router(request)).route()) === 'string')
request.respond(200, body)
} catch (err) {
request.error(err)
}
})
}
})written by gemma3:4b
lib/express/request.js
“Isxhr” departed, seeking a simpler connection.
2009-12-15 — 2011-02-03 · 1 year · 143 commits · 5 keepers
This Request file, born in 2009, served its purpose with 277 lines and 143 touches, finally succumbing to a submodule update in 2011.
⚰ 42af4e40 Updated connect submodule
Last words (277 lines at death)
// Callback for isXMLHttpRequest / xhr
function isxhr() {
return this.header('X-Requested-With', '').toLowerCase() === 'xmlhttprequest';
}
/**
* Check if the request was an _XMLHttpRequest_.
*
* @return {Boolean}
* @api public
*/
http.IncomingMessage.prototype.__defineGetter__('isXMLHttpRequest', isxhr);
http.IncomingMessage.prototype.__defineGetter__('xhr', isxhr);written by gemma3:4b
test/view.test.js
“Hello.jade”’s rendering ceased, a quiet, final view.
2010-07-05 — 2011-11-08 · 1 year · 134 commits · 3 keepers
This test file, born in 2010, diligently rendered ‘hello.jade’ for a year, finally succumbing to the "Remove old tests" command, leaving 1056 lines behind.
⚰ 9efc4b23 Remove old tests
Last words (1056 lines at death)
},
'test charset override': function(){
var app = create();
app.locals.charset = 'ISO-8859-1';
app.get('/', function(req, res){
res.render('hello.jade', { charset: 'utf8' });
});
assert.response(app,
{ url: '/' },
{ headers: { 'Content-Type': 'text/html; charset=utf8' }});
}
};written by gemma3:4b
lib/router/index.js
Arguments assembled, then swiftly, silently, dismissed.
2011-04-25 — 2015-07-06 · 4 years · 129 commits · 18 keepers
This index file, born in 2011, diligently handled function arguments before its quiet removal in 2015, a necessary step towards a streamlined routing system. Its 626 lines and 129 touches represent a focused period of service, ultimately superseded by a more modern approach.
⚰ cec5780d Use router module for routing
Last words (626 lines at death)
}
// wrap a function
function wrap(old, fn) {
return function proxy() {
var args = new Array(arguments.length + 1);
args[0] = old;
for (var i = 0, len = arguments.length; i < len; i++) {
args[i + 1] = arguments[i];
}
fn.apply(this, args);
};
}written by gemma3:4b
lib/express/view.js
“Return str;” – A final, insistent plea.
2009-11-30 — 2011-02-03 · 1 year · 128 commits · 8 keepers
This view component, born in 2009, diligently handled string rendering, ultimately succumbing to a submodule update in 2011, after 128 touches.
⚰ 42af4e40 Updated connect submodule
Last words (278 lines at death)
options.layout = false;
options.body = str;
options.relative = false;
self.render(layout, options, fn, view);
} else if (partial) {
return str;
} else if (fn) {
fn(null, str);
} else {
this.send(str, options.headers, options.status);
}
};written by gemma3:4b
test/response.test.js
“hey” – a final, bewildered message.
2010-07-05 — 2011-11-08 · 1 year · 103 commits · 4 keepers
This small file, born in 2010 and swiftly dispatched in 2011, served only to declare “hey” and confirm a character set, quietly fading after a brief, well-maintained existence.
⚰ 9efc4b23 Remove old tests
Last words (769 lines at death)
},
'test .charset with res.send()': function(){
var app = express.createServer();
app.get('/', function(req, res){
res.charset = 'ISO-8859-1';
res.send('<p>hey</p>');
});
assert.response(app,
{ url: '/' },
{ headers: { 'Content-Type': 'text/html; charset=ISO-8859-1' }});
}
};written by gemma3:4b
spec/spec.core.js
“Should throw an error,” a final, unfulfilled plea.
2009-06-26 — 2010-07-05 · 1 year · 68 commits · 2 keepers
This spec, born in 2009, ceased to exist with a simple “Removed specs,” a quiet expiration after a year of diligent tending by visionmedia and csausdev, leaving only 93 lines behind.
⚰ f97a222c Removed specs
Last words (93 lines at death)
configure('test')
order.should.eql ['a', 'c', 'd']
end
end
describe 'given no arguments'
it 'should throw an error'
// TODO: tighter spec once JSpec is fixed
-{ configure() }.should.throw_error
end
end
end
endwritten by gemma3:4b
lib/express/plugins/view.js
“Null” was its last word, a clean, decisive end.
2009-12-17 — 2010-06-18 · 183 days · 64 commits · 6 keepers
This plugin, born in 2009 and purged in 2010, served its purpose with 194 lines of code, tending to a brief but impactful existence.
⚰ a62a5d0d Removed old cruft
Last words (194 lines at death)
}), callback)
} else if (type === 'partials')
return content
else if (callback)
callback.call(this, null, content)
else
this.respond(200, content, options.encoding)
}
})
}
}
})written by gemma3:4b
lib/express/collection.js
Collection born, Collection gone, a swift transition.
2009-12-03 — 2010-03-10 · 97 days · 60 commits · 2 keepers
This file, created in 2009 and removed in 2010, diligently handled array conversions, a brief but impactful 97-day existence.
⚰ b0473250 Updated ext and removed Collection
Last words (538 lines at death)
})
/**
* Create a new collection from an array-like object.
*
* @param {object} arr
* @return {Collection}
* @api public
*/
var $ = exports.$ = function(arr) {
if (arr instanceof Collection) return arr
return new Collection(arr)
}written by gemma3:4b
lib/http.js
“All” methods handled, then swiftly deleted, a quiet end.
2011-03-01 — 2011-10-07 · 220 days · 56 commits · 2 keepers
This humble http.js, born in 2011, served its purpose briefly, guided by Tj and Ben, before a simple “removed old http.js” brought its 220 days to a close.
⚰ 02baa2b1 removed old http.js
Last words (580 lines at death)
*/
app.all = function(path){
var args = arguments;
if (1 == args.length) return this.routes.lookup('all', path);
methods.forEach(function(method){
if ('all' == method) return;
app[method].apply(this, args);
}, this);
return this;
};
// del -> delete alias
app.del = app.delete;written by gemma3:4b
spec/spec.collection.js
“Foo: bar” – a final, insistent declaration.
2009-12-03 — 2010-03-10 · 97 days · 49 commits · 1 keepers
This collection spec, born in 2009 and extinguished in 2010, diligently tested nested arrays, ultimately failing to match its predicted output.
⚰ 4b1c39fe Removed Collection specs
Last words (462 lines at death)
it 'should output [Collection ...] for array'
$([1,2,3]).toString().should.eql '[Collection 1,2,3]'
end
it 'should output [Collection [object Object]] for object'
$({ foo: "bar" }).toString().should.eql '[Collection [object Object]]'
end
it 'should output [Collection [[Collection ...]]] for nested collections'
$([$([1,2,3])]).toString().should.eql '[Collection [Collection 1,2,3]]'
end
end
end
endwritten by gemma3:4b
examples/chat/app.js
JSON encoded messages, a final, fleeting send.
2010-01-18 — 2010-07-05 · 168 days · 49 commits · 4 keepers
This example application, born in 2010, served a simple purpose before its quiet removal, marking 168 days of existence and a final transmission.
⚰ 730f4542 Removed examples
Last words (56 lines at death)
var previousLength = messages.length;
var id = setInterval(function(){
if (messages.length > previousLength) {
previousLength = messages.length;
res.writeHead(200, {
'Content-Type': 'application/json'
});
res.end(JSON.encode(messages));
clearInterval(id);
}
}, 100);
});written by gemma3:4b