mirror of
https://github.com/zoriya/flood.git
synced 2025-12-23 23:55:15 +00:00
Introduce client settings
This commit is contained in:
13
shared/util/objectUtil.js
Normal file
13
shared/util/objectUtil.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
let objectUtil = {
|
||||
reflect: (hash) => {
|
||||
return Object.keys(hash).reduce((memo, key) => {
|
||||
memo[key] = hash[key];
|
||||
memo[hash[key]] = key;
|
||||
return memo;
|
||||
}, {});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = objectUtil;
|
||||
Reference in New Issue
Block a user