mirror of
https://github.com/array-in-a-matrix/public-apis.git
synced 2025-04-02 11:11:50 -04:00
14 lines
417 B
JavaScript
14 lines
417 B
JavaScript
module.exports = function ({ readme, indexListIndex }) {
|
|
return readme
|
|
.map((child, i) => {
|
|
if (i <= indexListIndex) return
|
|
|
|
if (child.type === 'heading' && child.depth === 3) {
|
|
const name = child.children[0].value
|
|
const rows = readme[i + 1].children
|
|
|
|
return { name, rows }
|
|
}
|
|
})
|
|
.filter(table => table)
|
|
}
|