Coder Social home page Coder Social logo

js-ipfs-utils's Introduction

js-ipfs-utils

Travis CI Codecov branch Dependency Status js-standard-style

This package serves as a central repository for shared logic and dependencies for all IPFS packages, using ipfs-utils helps to easily re-use small scoped blocks of logic across all the js core interface implementations and also as a dependency proxy (think aegir for domain logic dependencies).

ipfs-utils aims to provide single function default export per file (with a few exceptions) scoped in 3 general categories:

  • General use
  • Data structs wrangling (arrays, objects, streams, etc)
  • IPFS core subsystems

General use and Data structs wrangling should try to be just re-exports of community packages.

The IPFS ecosystem has lots of repos with it comes several problems like:

  • Domain logic dedupe - all interface-core implementations shared a lot of logic like validation, streams handling, etc.
  • Dependencies management - it's really easy with so many repos for dependencies to go out of control, they become outdated, different repos use different modules to do the same thing (like merging defaults options), browser bundles ends up with multiple versions of the same package, bumping versions is cumbersome to do because we need to go through several repos, etc.

These problems are the motivation for this package, having shared logic in this package avoids creating cyclic dependencies, centralizes common use modules/functions (exactly like aegir does for the tooling), semantic versioning for 3rd party dependencies is handled in one single place (a good example is going from streams 2 to 3) and maintainers should only care about having ipfs-utils updated.

Lead Maintainer

Hugo Dias

Table of Contents

Install

$ npm install --save ipfs-utils

Usage

Each function should be imported directly.

const validateAddInput = require('ipfs-utils/src/files/add-input-validation')

validateAddInput(Buffer.from('test'))
// true

Functions

General Use

TODO

Data Struct Wrangling

TODO

Core API

TODO

Contribute

Contributions welcome. Please check out the issues.

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

License

MIT © Protocol Labs Inc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.