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 0.0.4 to 0.0.6

30

index.js

@@ -1,5 +0,2 @@

var net = require('net');
var fs = require('fs');
var stream = require('stream');
var assert = require('assert');
var http = require('http');

@@ -42,3 +39,4 @@ var Multipart = require('multipart-stream');

'Content-Type': contentType
}
},
withCredentials: false
}, function(res) {

@@ -55,3 +53,4 @@ var data = '';

if(res.statusCode >= 400) {
if(res.statusCode >= 400 || !res.statusCode) {
if(!data) data = new Error;
return cb(data, null);

@@ -186,3 +185,22 @@ }

},
id: command('id')
id: function(id, cb) {
if(typeof id === 'function') {
cb = id;
id = null;
}
send('id', id, null, null, cb);
},
pin: {
add: argCommand('pin/add'),
remove: argCommand('pin/rm'),
list: function(type, cb) {
if(typeof type === 'function') {
cb = type;
type = null;
}
var opts = null;
if(type) opts = { type: type }
send('pin/ls', null, opts, null, cb);
},
}
}

@@ -189,0 +207,0 @@ }

2

package.json
{
"name": "ipfs-api",
"version": "0.0.4",
"version": "0.0.6",
"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