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

jscrambler

Package Overview
Dependencies
Maintainers
7
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jscrambler - npm Package Compare versions

Comparing version 5.2.8 to 5.2.9

28

dist/client.js

@@ -45,2 +45,4 @@ 'use strict';

var debug = !!process.env.DEBUG;
/**

@@ -135,7 +137,8 @@ * @class JScramblerClient

// Format URL
var protocol = this.options.protocol || (this.options.port === 443 ? 'https' : 'http');
var port = this.options.port || (this.options.protocol === 'http' ? 80 : 443);
var protocol = this.options.protocol || (port === 80 ? 'http' : 'https');
var formatedUrl = _url2.default.format({
hostname: this.options.host,
port: this.options.port,
port: port,
protocol: protocol

@@ -170,7 +173,22 @@ }) + path;

return promise.then(function (res) {
if (res.status >= 200 && res.status < 400) {
return res.data;
return res.data;
}).catch(function (err) {
var errorMessage = 'Unexpected Response: ';
if (err.response) {
if (debug) {
console.error(err.response);
}
errorMessage += err.response.status + ' ' + err.response.statusText;
// For when we have API error messages
if (err.response.data && err.response.data.error && err.response.data.message) {
errorMessage += ' - ' + err.response.data.message;
}
} else {
errorMessage += err.message;
}
throw new Error('Unexpected Response Code: ' + res.status);
throw new Error(errorMessage);
});

@@ -177,0 +195,0 @@ };

3

dist/config.js

@@ -17,6 +17,5 @@ 'use strict';

keys: {},
host: 'api4.jscrambler.com',
port: 443
host: 'api4.jscrambler.com'
}, []);
exports.default = config;
{
"name": "jscrambler",
"description": "Jscrambler API client.",
"version": "5.2.8",
"version": "5.2.9",
"homepage": "https://github.com/jscrambler/jscrambler",

@@ -6,0 +6,0 @@ "author": {

@@ -13,3 +13,3 @@ # ![jscrambler](https://rawgithub.com/jscrambler/javascript-jscrambler/master/media/jscrambler-logo.png)

- [Quick example](#quick-example)
- [JScrambler Parameters](#jscrambler-parameters)
- [Jscrambler Parameters](#jscrambler-parameters)

@@ -16,0 +16,0 @@ ## Installation

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