mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
11 lines
204 B
JavaScript
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,
|
|
};
|