ipfs-unixfs-importer
Version:
JavaScript implementation of the UnixFs importer used by IPFS
10 lines (8 loc) • 303 B
text/typescript
import all from 'it-all'
import type { FileLayout } from './index.js'
import type { InProgressImportResult } from '../index.js'
export function flat (): FileLayout {
return async function flatLayout (source, reduce): Promise<InProgressImportResult> {
return await reduce(await all(source))
}
}