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

exframe-document-validator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exframe-document-validator - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

lib/document.js

@@ -6,2 +6,4 @@ 'use strict';

const customObjects = { Math };
const checkLogger = (context) => {

@@ -32,3 +34,3 @@ const newContext = context;

coverageDetails.coverageOptions.forEach((rawOption) => {
const transform = compile(rawOption, {});
const transform = compile(rawOption, { customObjects });
const option = document ? transform(document) : rawOption;

@@ -69,3 +71,3 @@ coField.children.push(`coverageOptions.${option.name}`);

coverageDetails.coverageLimits.forEach((rawLimit) => {
const transform = compile(rawLimit, {});
const transform = compile(rawLimit, { customObjects });
const limit = document ? transform(document) : rawLimit;

@@ -117,3 +119,3 @@ clField.children.push(`coverageLimits.${limit.name}`);

coverageDetails.deductibles.forEach((rawDeductible) => {
const transform = compile(rawDeductible, {});
const transform = compile(rawDeductible, { customObjects });
const deductible = document ? transform(document) : rawDeductible;

@@ -120,0 +122,0 @@ deductibleField.children.push(`deductibles.${deductible.name}`);

{
"name": "exframe-document-validator",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

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

@@ -261,2 +261,16 @@ 'use strict';

});
it('Does not fail when using Math within json-transpose', () => {
const coverageDetails = cloneDeep(baseDetails);
delete coverageDetails.coverageLimits;
coverageDetails.coverageLimits = [
{
name: 'dwelling',
required: true,
amount: '${Math.round(it.coverageLimits.dwelling.amount)}'
}
]
const document = cloneDeep(baseDocument);
const fields = () => documentLib.addCoverageLimits(coverageDetails, document);
expect(fields).to.not.throw();
});
it('Returns only the coverageLimits field when there are no coverageLimits', () => {

@@ -263,0 +277,0 @@ const coverageDetails = cloneDeep(baseDetails);

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