UNPKG
@bookbox/core
Version:
latest (0.4.0)
0.4.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.1
0.1.0
Bookbox — e-book format
@bookbox/core
/
build
/
esm
/
model
/
iterableBook.js
6 lines
(5 loc)
•
223 B
JavaScript
View Raw
1
2
3
4
5
6
import
{ iterableTreeGetter }
from
'../utils'
;
export
const
getIterableBook =
iterableTreeGetter
({
getChildren
:
item
=>
(
typeof
item !==
'string'
? item.
children
: []),
isLeaf
:
item
=>
typeof
item ===
'string'
, });