node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



Coverage Status Travis CI Circle CI Dependency Status js-standard-style

JavaScript implementation of the IPLD spec.



> npm i ipld

Use in Node.js

const ipld = require('ipld')

Use in a browser with browserify, webpack or any other bundler

The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.

var ipld = require('ipld')

Use in a browser Using a script tag

Loading this module through a script tag will make the Unixfs obj available in the global namespace.

<script src=""></script>
<!-- OR -->
<script src=""></script>


const ipld = require('ipld')
const file = {
  name: 'hello.txt',
  size: 11
// CBOR encoded Buffer 
const marshalled = ipld.marshal(file)
// => QmQtX5JVbRa25LmQ1LHFChkXWW5GaWrp7JpymN4oPuBSmL 
// Convert CBOR object to JavaScript object 
console.log(ipld.unmarshal(marshalled) === file)
// => true