1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/lib/routes/client-api/util.js

11 lines
204 B
JavaScript

'use strict';
const filter = (key, value) => {
if (!key || !value) return array => array;
return array => array.filter(item => item[key].startsWith(value));
};
module.exports = {
filter,
};