transit-im
Version:
express-like framework for AIM bots creation (ICQ as well)
19 lines (15 loc) • 382 B
JavaScript
// Generated by CoffeeScript 1.6.3
(function() {
var html2text;
html2text = function(html) {
if (html) {
return html.replace(/<(?:.|)*?>/gm, '').replace(/\r/gm, '').replace(/"/gi, '"');
}
};
module.exports = function() {
return function(req, res, next) {
req.attr("data", html2text(req.data));
return next();
};
};
}).call(this);