objectValues.js.flow 377 B

12345678910
  1. // @flow strict
  2. import type { ObjMap } from '../jsutils/ObjMap';
  3. declare function objectValues<T>(obj: ObjMap<T>): Array<T>;
  4. /* eslint-disable no-redeclare */
  5. // $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
  6. const objectValues =
  7. Object.values || ((obj) => Object.keys(obj).map((key) => obj[key]));
  8. export default objectValues;