Comparing version 1.1.4 to 1.1.6
13
index.js
@@ -16,6 +16,15 @@ 'use strict' | ||
module.exports = function (host, port) { | ||
if (!host) host = 'localhost' | ||
module.exports = function (host_or_multiaddr, port) { | ||
var host | ||
if (!host_or_multiaddr) host = 'localhost' | ||
if (!port) port = 5001 | ||
if (host_or_multiaddr.match('/')) { | ||
// is a multiaddr | ||
var parts = host_or_multiaddr.split('/') | ||
host = parts[2] | ||
port = parts[4] | ||
} | ||
function send (path, args, opts, files, buffer, cb) { | ||
@@ -22,0 +31,0 @@ if (Array.isArray(path)) path = path.join('/') |
{ | ||
"name": "ipfs-api", | ||
"version": "1.1.4", | ||
"version": "1.1.6", | ||
"description": "A client library for the IPFS API", | ||
@@ -18,2 +18,3 @@ "main": "index.js", | ||
"standard": "^3.3.2", | ||
"ipfsd-ctl": "0.1.5", | ||
"pre-commit": "^1.0.6" | ||
@@ -20,0 +21,0 @@ }, |
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
23394
14
574
1
3
2