implement reactjs history
This commit is contained in:
12
shared/utils/object.js
Normal file
12
shared/utils/object.js
Normal file
@@ -0,0 +1,12 @@
|
||||
class ObjectUtil {
|
||||
|
||||
static filterKeys(obj, keys){
|
||||
return Object.keys(obj).reduce((filtered, key)=>{
|
||||
if (keys.indexOf(key) >= 0) filtered[key] = obj[key]
|
||||
return filtered;
|
||||
}, {});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ObjectUtil;
|
||||
Reference in New Issue
Block a user