UNPKG

@bookbox/core

Version:

Bookbox — e-book format

6 lines (5 loc) 223 B
import { iterableTreeGetter } from '../utils'; export const getIterableBook = iterableTreeGetter({ getChildren: item => (typeof item !== 'string' ? item.children : []), isLeaf: item => typeof item === 'string', });