New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

henrybuilt-js-library

Package Overview
Dependencies
Maintainers
4
Versions
445
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

henrybuilt-js-library - npm Package Compare versions

Comparing version 1.8.214 to 1.8.215

3

package.json
{
"name": "henrybuilt-js-library",
"version": "1.8.214",
"version": "1.8.215",
"description": "",

@@ -33,3 +33,2 @@ "main": "index.js",

"dinero.js": "^1.6.0",
"dxf-writer": "^1.12.1",
"idempotent-babel-polyfill": "^7.4.4",

@@ -36,0 +35,0 @@ "inflection": "^1.12.0",

@@ -10,3 +10,2 @@ if (typeof(window) !== 'undefined') global.fetch = require('whatwg-fetch').fetch;

date: require('./date/date'),
dxf: require('./dxf'),
event: require('./event'),

@@ -13,0 +12,0 @@ formData: require('./formData'),

@@ -271,3 +271,3 @@ var libMaterials = require('@src/materials/materials');

var productOption = _.find(productOptions, {id: productOptionInstance.productOptionId});
var pricingRule = _.find(pricingRules, {id: productOption.pricingRuleId});
var pricingRule = _.find(pricingRules, {id: productOption[`${project.companyKey}PricingRuleId`]});
var unitPrice = dinero(0);

@@ -286,5 +286,15 @@

var width = _.get(productInstance, 'dimensions.width', 0); //return max price if we don't have an instance
if (width > 42 && width <= 72) unitPrice = dinero(1200);
if (width > 72) unitPrice = dinero(1500);
if (width > 72) unitPrice = dinero(1500);
if (moment(project.pricingDate).isSameOrAfter('2022-03-01')) {
unitPrice = unitPrice.multiply(1.08);
}
if (project.companyKey === 'vp') {
unitPrice = unitPrice.multiply(0.7); //vp discount only applies to lighting
}
unitPrice = dinero((Math.ceil(unitPrice.getAmount() / 500) * 500) / 100); //hint round to nearest 5
}

@@ -291,0 +301,0 @@

@@ -112,3 +112,3 @@ describe('lib.price', () => {

var productOptions = [
{id: 1, price: 100, pricingRuleId: 5, }
{id: 1, price: 100, hbPricingRuleId: 5, vpPricingRuleId: 6}
];

@@ -134,3 +134,4 @@

]},
{id: 5, expressions: [{type: 'fixed', props: {price: 100}}]}
{id: 5, expressions: [{type: 'fixed', props: {price: 100}}]},
{id: 6, expressions: [{type: 'fixed', props: {price: 50}}]}
];

@@ -137,0 +138,0 @@

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