Comparing version 1.1.2 to 1.2.0
21
index.js
@@ -27,5 +27,6 @@ var fs = require('fs'); | ||
var contentType = 'application/json'; | ||
if(files) { | ||
var boundary = randomString(); | ||
var contentType = 'multipart/form-data; boundary=' + boundary; | ||
contentType = 'multipart/form-data; boundary=' + boundary; | ||
} | ||
@@ -233,4 +234,18 @@ | ||
pin: { | ||
add: argCommand('pin/add'), | ||
remove: argCommand('pin/rm'), | ||
add: function(hash, opts, cb) { | ||
if(typeof opts === 'function') { | ||
cb = opts; | ||
opts = null; | ||
} | ||
send('pin/add', hash, opts, null, cb); | ||
}, | ||
remove: function(hash, opts, cb) { | ||
if(typeof opts === 'function') { | ||
cb = opts; | ||
opts = null; | ||
} | ||
send('pin/rm', hash, opts, null, cb); | ||
}, | ||
list: function(type, cb) { | ||
@@ -237,0 +252,0 @@ if(typeof type === 'function') { |
{ | ||
"name": "ipfs-api", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "A client library for the IPFS API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11609
278
1