1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/routes/client-api/util.js

11 lines
204 B
JavaScript
Raw Normal View History

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