Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-api

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-api - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

33

index.js

@@ -52,2 +52,3 @@ var fs = require('fs');

var chunkedObjects = !!res.headers['x-chunked-output'];
if(chunkedObjects && buffer) return cb(null, res);

@@ -96,2 +97,4 @@ var data = '';

}
return req;
}

@@ -134,3 +137,3 @@

return function(cb) {
send(name, null, null, null, cb);
return send(name, null, null, null, cb);
}

@@ -141,3 +144,3 @@ }

return function(arg, cb) {
send(name, arg, null, null, cb);
return send(name, arg, null, null, cb);
}

@@ -150,3 +153,3 @@ }

add: function(file, cb) {
send('add', null, null, file, cb);
return send('add', null, null, file, cb);
},

@@ -159,9 +162,9 @@ cat: argCommand('cat'),

set: function(key, value, cb) {
send('config', [key, value], null, null, cb)
return send('config', [key, value], null, null, cb)
},
show: function(cb) {
send('config/show', null, null, null, true, cb);
return send('config/show', null, null, null, true, cb);
},
replace: function(file, cb) {
send('config/replace', null, null, file, cb)
return send('config/replace', null, null, file, cb)
}

@@ -189,3 +192,3 @@ },

if(ipns) opts.n = ipns;
send('mount', null, opts, null, cb);
return send('mount', null, opts, null, cb);
},

@@ -202,3 +205,3 @@

return cb(null, new Error('block.put() only accepts 1 file'));
send('block/put', null, null, file, cb);
return send('block/put', null, null, file, cb);
},

@@ -212,3 +215,3 @@ },

return cb(null, new Error('Must specify an object encoding ("json" or "protobuf")'))
send('block/put', encoding, null, file, cb);
return send('block/put', encoding, null, file, cb);
},

@@ -224,3 +227,3 @@ data: argCommand('object/data'),

ping: function(id, cb) {
send('ping', id, { n: 1 }, null, function(err, res) {
return send('ping', id, { n: 1 }, null, function(err, res) {
if(err) return cb(err, null);

@@ -236,3 +239,3 @@ cb(null, res[1]);

}
send('id', id, null, null, cb);
return send('id', id, null, null, cb);
},

@@ -249,3 +252,3 @@ pin: {

if(type) opts = { type: type }
send('pin/ls', null, opts, null, cb);
return send('pin/ls', null, opts, null, cb);
},

@@ -257,2 +260,8 @@ },

disable: command('gateway/disable')
},
log: {
tail: function(cb) {
return send('log/tail', null, {enc: 'text'}, null, true, cb);
}
}

@@ -259,0 +268,0 @@ }

{
"name": "ipfs-api",
"version": "1.0.2",
"version": "1.1.0",
"description": "An client library for the IPFS API",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc