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

couponable

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couponable - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

8

index.js

@@ -36,2 +36,3 @@ // if the comma or decimal portions of the price need internationalization

total = orderItem.priceInCents;
let totalAmountOffInCents;

@@ -45,5 +46,10 @@ if (orderItem.variation) {

total = total * quantity;
if (orderItem.isBulkPurchase && orderItem.coupon.amountOffInCents) {
totalAmountOffInCents = orderItem.coupon.amountOffInCents * quantity
}
quantity = 1;
}
total = Math.round(discountable(total, orderItem.coupon.percentOff, orderItem.coupon.amountOffInCents));
total = Math.round(discountable(total, orderItem.coupon.percentOff, totalAmountOffInCents || orderItem.coupon.amountOffInCents));
}

@@ -50,0 +56,0 @@

2

package.json
{
"name": "couponable",
"description": "Helper functions for dealing with coupons.",
"version": "6.1.0",
"version": "6.2.0",
"author": "Chris McC",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -48,3 +48,3 @@ var couponable = require('.');

isBulkPurchase: true
}), 95);
}), 50);
});

@@ -51,0 +51,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