UNPKG

ipfs-unixfs-importer

Version:

JavaScript implementation of the UnixFs importer used by IPFS

5 lines (4 loc) 156 B
export const toPathComponents = (path: string = ''): string[] => { // split on / unless escaped with \ return path.split(/(?<!\\)\//).filter(Boolean) }