UNPKG

react-mapfilter

Version:

These components are designed for viewing data in Mapeo. They share a common interface:

21 lines (19 loc) 468 B
import { flatObjectEntries } from './flat_object_entries' test('flatObjectEntries', () => { expect( flatObjectEntries({ empty: {}, emptyArr: [], foo: { bar: 'qux' }, hello: 'world', arr: ['biz', 'baz'], other: [{ foo: 'bar' }, { qux: 'quz' }] }) ).toEqual([ [['foo', 'bar'], 'qux'], [['hello'], 'world'], [['arr'], ['biz', 'baz']], [['other', 0, 'foo'], 'bar'], [['other', 1, 'qux'], 'quz'] ]) })