27f9cbb8eaf281a1cc1300a23798ce4fdf74c174
[dotfiles/.git] / index.js
1 'use strict';
2 module.exports = object => {
3         if (typeof object !== 'object') {
4                 throw new TypeError('Expected an object');
5         }
6
7         const ret = {};
8
9         for (const key of Object.keys(object)) {
10                 const value = object[key];
11                 ret[value] = key;
12         }
13
14         return ret;
15 };