mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 14:22:07 +03:00
da7fdfeae6
refs #9866
16 lines
310 B
JavaScript
16 lines
310 B
JavaScript
const _ = require('lodash');
|
|
|
|
const trimAndLowerCase = (params) => {
|
|
params = params || '';
|
|
|
|
if (_.isString(params)) {
|
|
params = params.split(',');
|
|
}
|
|
|
|
return params.map((item) => {
|
|
return item.trim().toLowerCase();
|
|
});
|
|
};
|
|
|
|
module.exports.trimAndLowerCase = trimAndLowerCase;
|