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

@bizon/amazon-ids

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bizon/amazon-ids - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

6

index.js

@@ -8,3 +8,7 @@ const memoize = require('memoizee')

exports.getMarketplaceById = memoize(id => {
return marketplaces.find(marketplace => marketplace.id === id)
return marketplaces.find(
marketplace => marketplace.id === id || (
marketplace.multiChannelId && marketplace.multiChannelId === id
)
)
})

@@ -11,0 +15,0 @@

27

marketplaces.json

@@ -9,3 +9,4 @@ [

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A3JWKAKR8XB7XF"
"vendorId": "A3JWKAKR8XB7XF",
"multiChannelId": "A38D8NSA03LJTC"
},

@@ -19,3 +20,4 @@ {

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A1AT7YVPFBWXBL"
"vendorId": "A1AT7YVPFBWXBL",
"multiChannelId": "AFQLKURYRPEL8"
},

@@ -29,3 +31,4 @@ {

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A1X6FK5RDHNB96"
"vendorId": "A1X6FK5RDHNB96",
"multiChannelId": "A1ZFFQZ3HTUKT9"
},

@@ -39,3 +42,4 @@ {

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A11IL2PNWYJU7H"
"vendorId": "A11IL2PNWYJU7H",
"multiChannelId": "A62U237T8HV6N"
},

@@ -49,3 +53,4 @@ {

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A3P5ROKL5A1OLE"
"vendorId": "A3P5ROKL5A1OLE",
"multiChannelId": "AZMDEXL2RVFNN"
},

@@ -59,3 +64,4 @@ {

"imagesDomain": "images-na.ssl-images-amazon.com",
"vendorId": "A3DWYIK6Y9EEQB"
"vendorId": "A3DWYIK6Y9EEQB",
"multiChannelId": "A1MQXOICRS2Z7M"
},

@@ -69,3 +75,4 @@ {

"imagesDomain": "images-na.ssl-images-amazon.com",
"vendorId": "AVDBXBAVVSXLQ"
"vendorId": "AVDBXBAVVSXLQ",
"multiChannelId": "A3H6HPSLHAK3XG"
},

@@ -79,3 +86,4 @@ {

"imagesDomain": "images-na.ssl-images-amazon.com",
"vendorId": "ATVPDKIKX0DER"
"vendorId": "ATVPDKIKX0DER",
"multiChannelId": "A2ZV50J4W1RKNI"
},

@@ -107,3 +115,4 @@ {

"imagesDomain": "images-eu.ssl-images-amazon.com",
"vendorId": "A1UNQM1SR2CHM"
"vendorId": "A1UNQM1SR2CHM",
"multiChannelId": "A33AVAJ2PDY3EV"
},

@@ -110,0 +119,0 @@ {

{
"name": "@bizon/amazon-ids",
"version": "1.2.0",
"version": "1.3.0",
"description": "Collection of Amazon identifiers",

@@ -17,3 +17,3 @@ "main": "index.js",

"devDependencies": {
"xo": "^0.24.0"
"xo": "^0.25.3"
},

@@ -20,0 +20,0 @@ "xo": {

@@ -40,9 +40,29 @@ # amazon-ids [![CircleCI](https://circleci.com/gh/bizon/amazon-ids.svg?style=svg)](https://circleci.com/gh/bizon/amazon-ids)

imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'AVDBXBAVVSXLQ' }
vendorId: 'AVDBXBAVVSXLQ',
multiChannelId: 'A3H6HPSLHAK3XG' }
*/
```
### `getMarketplaceByCode(id)`
It’s also possible to find a marketplace by its multi-channel fulfilment identifier:
```js
const {getMarketplaceById} = require('@bizon/amazon-ids')
console.log(getMarketplaceById('A3H6HPSLHAK3XG'))
/*
{ code: 'mx',
id: 'A1AM78C64UM0Y8',
name: 'Mexico',
domain: 'amazon.com.mx',
mwsDomain: 'mws.amazonservices.com',
imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'AVDBXBAVVSXLQ',
multiChannelId: 'A3H6HPSLHAK3XG' }
*/
```
### `getMarketplaceByCode(code)`
```js
const {getMarketplaceByCode} = require('@bizon/amazon-ids')

@@ -59,3 +79,4 @@

imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'AVDBXBAVVSXLQ' }
vendorId: 'AVDBXBAVVSXLQ',
multiChannelId: 'A3H6HPSLHAK3XG' }
*/

@@ -78,3 +99,4 @@ ```

imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'AVDBXBAVVSXLQ' }
vendorId: 'AVDBXBAVVSXLQ',
multiChannelId: 'A3H6HPSLHAK3XG' }
*/

@@ -81,0 +103,0 @@ ```

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