mirror of
https://github.com/zoriya/flood.git
synced 2025-12-22 23:25:27 +00:00
14 lines
235 B
JavaScript
14 lines
235 B
JavaScript
'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;
|