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

commercelayer

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commercelayer - npm Package Compare versions

Comparing version 1.7.6 to 1.7.7

2

package.json
{
"name": "commercelayer",
"version": "1.7.6",
"version": "1.7.7",
"description": "The Official Commerce Layer JS library",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

@@ -140,2 +140,4 @@ const config = require('./config')

).then(data => {
console.log('createOrder');
console.log(data);
utils.setOrderToken(data.get('token'))

@@ -257,2 +259,4 @@ return(data)

console.log(shoppingBagItem);
// image

@@ -282,2 +286,3 @@ let shoppingBagItemImage = shoppingBagItem.querySelector('.clayer-shopping-bag-item-image')

qtySelect.addEventListener('change', function(event){
event.preventDefault()
api.updateLineItemQty(this.dataset.lineItemId, this.value)

@@ -325,5 +330,3 @@ })

let order = response.get(['line_items'])[0]
if (order && order.line_items) {
if (response.get(['line_items']).length > 0) {
api.updateShoppingBagItems(response)

@@ -330,0 +333,0 @@ ui.hideShoppingBagUnavailableMessage() // refactor

@@ -33,5 +33,8 @@ const ui = require('./ui')

console.log(utils.getOrderToken());
orderPromise = utils.getOrderToken() ? api.getOrder() : api.createOrder()
orderPromise.then(function(order){
api.createLineItem(order.get('id')[0], addToBag.dataset.skuId, addToBag.dataset.skuName, addToBag.dataset.skuImageUrl).then(function(lineItem){

@@ -38,0 +41,0 @@ api.getOrder()

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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