Last change
on this file since 84d0fbb was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
Property mode
set to
100644
|
File size:
269 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 | module.exports = function objFilter (original, filter) {
|
---|
3 | const obj = {}
|
---|
4 | filter = filter || ((k, v) => true)
|
---|
5 | Object.keys(original || {}).forEach((key) => {
|
---|
6 | if (filter(key, original[key])) {
|
---|
7 | obj[key] = original[key]
|
---|
8 | }
|
---|
9 | })
|
---|
10 | return obj
|
---|
11 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.