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

couponable

Package Overview
Dependencies
Maintainers
1
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 5.0.0 to 6.0.0

2

bower.json
{
"name": "couponable",
"version": "5.0.0",
"version": "6.0.0",
"description": "Helper functions for dealing with coupons.",

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

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

} else {
return orderItem.priceInCents;
return orderItem.priceInCents * (orderItem.quantity || 1);
}

@@ -100,0 +100,0 @@ } else {

{
"name": "couponable",
"description": "Helper functions for dealing with coupons.",
"version": "5.0.0",
"version": "6.0.0",
"author": "Chris McC",

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

@@ -166,2 +166,12 @@ var couponable = require('.');

it('returns the total recurring while taking quantity into account', function() {
assert.equal(totalLineTwo({
quantity: 10,
purchasableType: 'bundle',
interval: 'month',
coupon: {amountOffInCents: 4, duration: 'once'},
priceInCents: 6
}), '$0.60 / month');
});
it('returns an alternate currency symbol', function() {

@@ -168,0 +178,0 @@ assert.equal(totalLineTwo({

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