New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

netstorageapi

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netstorageapi - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

16

lib/netstorage.js

@@ -26,3 +26,3 @@ // Original author: Astin Choi <achoi@akamai.com>

var Netstorage = function(hostname, keyname, key, ssl) {
if (!hostname && !keyname && !key) {
if (!(hostname && keyname && key)) {
throw new Error('[Netstorage Error] You should input netstorage hostname, keyname and key all');

@@ -67,3 +67,4 @@ }

'X-Akamai-ACS-Auth-Sign': acs_auth_sign,
'Accept-Encoding': 'identity'
'Accept-Encoding': 'identity',
'User-Agent': 'NetStorageKit-Node'
}

@@ -199,7 +200,9 @@ };

try {
if (fs.lstatSync(local_source).isDirectory()) {
callback(error=new Error("[Netstorage Error] You should upload a file, not directory"));
if (fs.statSync(local_source).isFile()) {
if (ns_destination.endsWith('/')) {
ns_destination = `${ns_destination}${path.basename(local_source)}`;
}
} else {
callback(error=new Error("[Netstorage Error] You should upload a file"));
return;
} else if (ns_destination.endsWith('/')) {
ns_destination = `${ns_destination}${path.basename(local_source)}`;
}

@@ -218,3 +221,2 @@ } catch (e) {

module.exports = Netstorage;
{
"name": "netstorageapi",
"version": "0.6.1",
"version": "0.7.0",
"description": "Akamai Netstorage API for Node.js",

@@ -5,0 +5,0 @@ "main": "./lib/netstorage.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