UNPKG

ipfs-api

Version:

A client library for the IPFS HTTP API

22 lines (17 loc) 393 B
'use strict' const promisify = require('promisify-es6') const transform = function (res, callback) { callback(null, res.Version) } module.exports = (send) => { return promisify((opts, callback) => { if (typeof (opts) === 'function') { callback = opts opts = {} } send.andTransform({ path: 'repo/version', qs: opts }, transform, callback) }) }