Projekt

Obecné

Profil

Stáhnout (256 Bajtů) Statistiky
| Větev: | Revize:
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
};
(1-1/4)