UNPKG

reg

Version:

`reg` is a package manager for native ES Modules. It's built to enable dependency management for Universal JavaScript (JavaScript that can run in the Browser and in Node.js w/o a compiler).

12 lines (9 loc) 297 B
const schema = require('../schema.json') const gen = require('@ipld/schema-gen') const { createTypes } = require('@ipld/unixfsv2') const create = (opts = {}) => { const types = createTypes(opts) opts = { ...opts, types } return { ...types, ...gen(schema, opts) } } module.exports = create