hyper/lib/utils/object.js
Matheus Fernandes 1866104d03 [WIP] Use XO instead of Standard (#723)
* Bump `eslint-plugin-react`

* Add `eslint-config-xo-react`

* Add XO

* Remove eslint-related dependencies, add XO config and use XO as the linter

* Code style: Standard => XO 

* Use xo property to ignore files

* Fix remaining errors
2016-09-21 16:27:11 +02:00

17 lines
365 B
JavaScript

import vals from 'object-values';
const valsCache = new WeakMap();
export function values(imm) {
if (!valsCache.has(imm)) {
valsCache.set(imm, vals(imm));
}
return valsCache.get(imm);
}
const keysCache = new WeakMap();
export function keys(imm) {
if (!keysCache.has(imm)) {
keysCache.set(imm, Object.keys(imm));
}
return keysCache.get(imm);
}