ipfs-browser-global

0.0.7 • Public • Published

To use, simply:

npm i github:DougAnderson444/ipfs-browser-global

then just import it, and use it:

// IPFS saver
import IPFS from 'ipfs-browser-global'
IPFS() // initialize it

// now you'll have access to the global (window.)ipfs object
  async save (saveObject) {
    if (!ipfs) await IPFS()
    const rootCID = ipfs.dag.put(saveObject, { pin: true })
    return rootCID
  }

/ipfs-browser-global/

    Package Sidebar

    Install

    npm i ipfs-browser-global

    Weekly Downloads

    1

    Version

    0.0.7

    License

    ISC

    Unpacked Size

    30.4 MB

    Total Files

    12

    Last publish

    Collaborators

    • douganderson444