UNPKG

@helia/verified-fetch

Version:

A fetch-like API for obtaining verified & trustless IPFS content on the web

10 lines (9 loc) 230 B
/** * Joins an array of strings as an IPFS path and URI encodes individual * components */ export function uriEncodeIPFSPath (str: string): string { return str.split('/') .map(p => encodeURIComponent(p)) .join('/') }