Socket
Socket
Sign inDemoInstall

analytics-node

Package Overview
Dependencies
Maintainers
5
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-node - npm Package Compare versions

Comparing version 5.1.2 to 5.2.0

17

index.js

@@ -50,3 +50,3 @@ 'use strict'

this.flushAt = Math.max(options.flushAt, 1) || 20
this.maxQueueSize = options.maxQueueSize || 1024 * 500 // defaults to 500kb
this.maxQueueSize = options.maxQueueSize || 1024 * 450 // 500kb is the API limit, if we approach the limit i.e., 450kb, we'll flush
this.flushInterval = options.flushInterval || 10000

@@ -242,3 +242,4 @@ this.flushed = false

if (!this.enable) {
return setImmediate(callback)
setImmediate(callback)
return Promise.resolve()
}

@@ -252,3 +253,4 @@

if (!this.queue.length) {
return setImmediate(callback)
setImmediate(callback)
return Promise.resolve()
}

@@ -292,10 +294,15 @@

return this.axiosInstance.post(`${this.host}${this.path}`, data, req)
.then(() => done())
.then(() => {
done()
return Promise.resolve(data)
})
.catch(err => {
if (err.response) {
const error = new Error(err.response.statusText)
return done(error)
done(error)
throw error
}
done(err)
throw err
})

@@ -302,0 +309,0 @@ }

{
"name": "analytics-node",
"version": "5.1.2",
"version": "5.2.0",
"description": "The hassle-free way to integrate analytics into any Node.js application",

@@ -57,3 +57,2 @@ "license": "MIT",

"nyc": "^15.1.0",
"pify": "^4.0.1",
"sinon": "^7.3.2",

@@ -60,0 +59,0 @@ "snyk": "^1.171.1",

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