You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
317 B
JavaScript
16 lines
317 B
JavaScript
'use strict';
|
|
|
|
var S = require.main.require('string');
|
|
|
|
var library = {};
|
|
|
|
library.getTeasers = function(data, callback) {
|
|
data.teasers.forEach(function(teaser) {
|
|
if (teaser && teaser.content) {
|
|
teaser.content = S(teaser.content).stripTags('img').s;
|
|
}
|
|
});
|
|
callback(null, data);
|
|
};
|
|
|
|
module.exports = library; |