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

@vates/cart

Package Overview
Dependencies
Maintainers
10
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vates/cart - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

15

dist/index.js

@@ -80,2 +80,7 @@ 'use strict';

},
subCompany: {
get: function get() {
return order.subCompany;
}
},
onUpgrade: {

@@ -340,3 +345,3 @@ get: function get() {

item.tax = getTax(countryCode, item.amount, item.currency, {
item.tax = getTax(countryCode, this.subCompany, item.amount, item.currency, {
taxRatio: taxRatio,

@@ -742,5 +747,5 @@ taxName: taxName

function getTax(countryCode, amount) {
var currency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'USD';
var _ref7 = arguments[3];
function getTax(countryCode, subCompany, amount) {
var currency = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'USD';
var _ref7 = arguments[4];
var _ref7$taxRatio = _ref7.taxRatio,

@@ -751,3 +756,3 @@ taxRatio = _ref7$taxRatio === undefined ? undefined : _ref7$taxRatio,

var vatRatio = taxRatio !== undefined ? taxRatio : Utils.getVatRate(countryCode);
var vatRatio = taxRatio !== undefined ? taxRatio : Utils.getVatRate(countryCode, subCompany);
var tax = amount * vatRatio;

@@ -754,0 +759,0 @@

{
"name": "@vates/cart",
"version": "0.0.2",
"version": "0.1.0",
"description": "A class to wrap and add methods to an Order's Cart.",

@@ -22,4 +22,4 @@ "main": "dist/index.js",

"dependencies": {
"@vates/discount": "^0.0.0",
"@vates/www-xo-utils": "^0.25.0",
"@vates/discount": "^0.1.0",
"@vates/www-xo-utils": "^0.29.0",
"lodash": "^4.17.21",

@@ -26,0 +26,0 @@ "moment": "^2.29.4"

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