mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-16 01:01:16 -04:00
12 lines
320 B
JavaScript
12 lines
320 B
JavaScript
const challengesRegex = /^(bonfire|waypoint|zipline|basejump|checkpoint):\s/i;
|
|
|
|
export default function jadeHelpers() {
|
|
return function jadeHelpersMiddleware(req, res, next) {
|
|
res.locals.removeOldTerms = function removeOldTerms(str = '') {
|
|
return str.replace(challengesRegex, '');
|
|
};
|
|
|
|
next();
|
|
};
|
|
}
|