UNPKG

ipfs-api

Version:

A client library for the IPFS HTTP API

24 lines (19 loc) 417 B
'use strict' const promisify = require('promisify-es6') const transform = function (res, callback) { callback(null, { enabled: res.Enabled }) } module.exports = (send) => { return promisify((opts, callback) => { if (typeof (opts) === 'function') { callback = opts opts = {} } send.andTransform({ path: 'name/pubsub/state', qs: opts }, transform, callback) }) }