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

@kasko/quote-calculator-js

Package Overview
Dependencies
Maintainers
10
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kasko/quote-calculator-js - npm Package Compare versions

Comparing version 1.0.12 to 1.1.0

7

CHANGELOG.md
# Changelog
## [v1.1.0](https://github.com/kasko/quote-calculator-js-lib/compare/v1.0.12...v1.1.0) (2023-10-20)
## Feature
- `calculator` - Adds `CalculatorAndTests` class that will read pricing tests sheet;
## Other
- `parser` - Publish xlsx to json parser binaries;
## [v1.0.12](https://github.com/kasko/quote-calculator-js-lib/compare/v1.0.11...v1.0.12) (2023-03-21)

@@ -3,0 +10,0 @@ ## Bugfix

17

dist/calculator.d.ts

@@ -96,2 +96,3 @@ import { parseXLSX } from '../../sheet-reader/src/parser.js';

getExtra(): Record<string, any>;
getSheet(name: string): Worksheet;
private setupParser;

@@ -101,3 +102,9 @@ private fillConfig;

private fillCells;
private getTable;
getTable(header: string, sheetName?: string): {
source: {
c: number;
r: number;
};
fields: string[];
};
private calculate;

@@ -132,2 +139,10 @@ private getFieldsWithValues;

}
export declare class CalculatorAndTests<I = Record<string, any>, O = Record<string, any>, C = IConfig> extends Calculator<I, O, C> {
init(spreadSheetPath: string): Promise<void>;
getTestTable(source: {
c: number;
r: number;
}): Record<string, any>;
getTestData(): Record<string, any>;
}
export { parseXLSX };

12

package.json
{
"name": "@kasko/quote-calculator-js",
"version": "1.0.12",
"version": "1.1.0",
"description": "KASKO Spreadsheet Quote Calculator",

@@ -8,6 +8,8 @@ "main": "dist/calculator.js",

"scripts": {
"build": "yarn generate && yarn build:calculator && yarn declarations",
"build": "yarn generate && yarn build:calculator && yarn build:parser && yarn declarations",
"generate": "cd packages/formula-parser/src/grammar-parser && jison grammar-parser.jison",
"build:calculator": "esbuild --log-level=error --bundle packages/calculator/src/calculator.ts --outdir=dist --minify --format=cjs --target=es2015 --platform=node --sourcemap",
"parse": "node bin/parse-xlsx.js ./test-files ./pricing ./lambda/visana-private-liability",
"build:calculator": "esbuild --log-level=info --bundle packages/calculator/src/calculator.ts --outdir=dist --minify --format=cjs --target=es2015 --platform=node --sourcemap",
"build:parser": "esbuild --log-level=info --bundle --platform=node --minify --outdir=bin packages/bin/parse-xlsx.js",
"build:binary:parser": "yarn build:parser && npx pkg bin/parse-xlsx.js -t node18-linux,node18-macos -o binaries/parse-xlsx",
"parse": "node packages/bin/parse-xlsx.js ./test-files ./pricing ./lambda/visana-private-liability",
"start": "node index.js",

@@ -37,3 +39,3 @@ "test": "uvu test",

"typescript": "^4.2.3",
"uvu": "^0.5.1"
"uvu": "^0.5.6"
},

@@ -40,0 +42,0 @@ "files": [

@@ -79,3 +79,12 @@ # quote-calculator-js-lib

In case of loading parsed xlsx file as json:
```diff
+const workbook = require('./kasko-demo.json');
-const path = './kasko-demo.xlsx';
...
+await calculator.init(workbook, input, config);
-await calculator.init(path, input, config);
```
## Development

@@ -82,0 +91,0 @@

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

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

Sorry, the diff of this file is not supported yet

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