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

@laboratoria/hubspot

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@laboratoria/hubspot - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

32

index.js

@@ -38,27 +38,15 @@ import https from 'node:https';

const contentType = (response.headers['content-type'] || '').split(';')[0];
const isJSON = contentType === 'application/json';
if (contentType !== 'application/json') {
return reject(
new Error(`Expected content-type to be JSON and got ${contentType}`),
);
}
const respond = (error, json) => {
try {
const json = isJSON ? JSON.parse(responseText) : null;
if (response.statusCode !== 200) {
return reject(Object.assign(
new Error(`Error fetching ${url}: ${response.statusCode}`),
{ json, responseText },
{ json, responseText, statusCode: response.statusCode },
));
}
if (error) {
return reject(error);
}
resolve(json);
};
try {
const json = JSON.parse(responseText);
respond(null, json);
resolve(isJSON ? json : responseText);
} catch (err) {
respond(err);
reject(err);
}

@@ -151,3 +139,9 @@ });

},
);
)
.catch((err) => {
if (err.statusCode === 404) {
return null;
}
throw err;
});

@@ -154,0 +148,0 @@ const getByIds = (

{
"name": "@laboratoria/hubspot",
"version": "0.6.0",
"version": "0.7.0",
"description": "Unofficial Hubspot Node.js client",

@@ -5,0 +5,0 @@ "license": "MIT",

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