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

apac

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apac - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

8

lib/throttler.js

@@ -13,14 +13,14 @@ "use strict"

}
execute(cb) {
let nowMillis = getNowMillis()
if (this.maxRequestsPerSecond === 0) {
return cb()
return Promise.resolve(cb())
} else if (nowMillis >= this._nextAvailableRequestMillis) {
this._nextAvailableRequestMillis = getNowMillis() + this._timeBetweenRequestsInMilliSeconds
return cb()
return Promise.resolve(cb())
} else {
return new Promise((resolve) => {
setTimeout(() => {
resolve(cb)
resolve(cb())
}, this._nextAvailableRequestMillis - nowMillis)

@@ -27,0 +27,0 @@ this._nextAvailableRequestMillis += this._timeBetweenRequestsInMilliSeconds

{
"name": "apac",
"description": "Amazon Product Advertising API Client for Node",
"version": "2.0.0",
"version": "2.0.1",
"author": "Dustin McQuay <dmcquay@gmail.com>",

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

@@ -28,3 +28,3 @@ "use strict"

awsSecret: config.AWS_SECRET_ACCESS_KEY,
assocId: config.AWS_ASSOCIATE_ID
assocId: config.AWS_ASSOCIATE_ID
})

@@ -43,6 +43,6 @@

expect(result.ItemSearchResponse).to.exist
expect(result.ItemSearchResponse.Items.length).to.equal(1)
expect(result.ItemSearchResponse.Items[0].Item[0].ItemAttributes[0].Author[0]).to.equal('J.K. Rowling')
expect(result.ItemSearchResponse.Items.Item.length).to.be.at.least(1)
expect(result.ItemSearchResponse.Items.Item[0].ItemAttributes.Author[0]).to.equal('J.K. Rowling')
})
})
})
})
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