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

aws-price

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-price - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

derp

30

index.js

@@ -44,3 +44,9 @@ /**

Price.prototype.country = function (country) {
if (endpointMap[country]) this.opts.endpoint = country;
// Find matching endpoints
var match = endpointMap.filter(function (e) {
return e.code === country.toUpperCase() || e.name === country;
});
// Set the first matching endpoint
if (match.length > 0) this.opts.endpoint = match[0].endpoint;
return this;

@@ -142,13 +148,13 @@ };

var endpointMap = {
'canada': 'webservices.amazon.ca',
'china': 'webservices.amazon.cn',
'germany': 'webservices.amazon.de',
'spain': 'webservices.amazon.es',
'france': 'webservices.amazon.fr',
'italy': 'webservices.amazon.it',
'japan': 'webservices.amazon.jp',
'uk': 'webservices.amazon.uk',
'us': 'webservices.amazon.us',
};
var endpointMap = [
{ name: 'canada', code: 'CA', endpoint: 'webservices.amazon.ca' },
{ name: 'china', code: 'CN', endpoint: 'webservices.amazon.cn' },
{ name: 'germany', code: 'DE', endpoint: 'webservices.amazon.de' },
{ name: 'spain', code: 'ES', endpoint: 'webservices.amazon.es' },
{ name: 'france', code: 'FR', endpoint: 'webservices.amazon.fr' },
{ name: 'italy', code: 'IT', endpoint: 'webservices.amazon.it' },
{ name: 'japan', code: 'JP', endpoint: 'webservices.amazon.jp' },
{ name: 'uk', code: 'GB', endpoint: 'webservices.amazon.uk' },
{ name: 'us', code: 'US', endpoint: 'webservices.amazon.us' }
];

@@ -155,0 +161,0 @@ var defaultExtractions = {

2

package.json
{
"name": "aws-price",
"version": "0.2.0",
"version": "0.3.0",
"description": "Amazon product API price lookup simplified",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ var util = require('util');

.associate('vi01d-20')
.country('italy')
.country('de')

@@ -9,0 +9,0 @@ a.done(function (err, res) {

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