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

@contrail/types

Package Overview
Dependencies
Maintainers
4
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/types - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

lib/properties/index.d.ts

2

lib/formulas/formula-processor.d.ts

@@ -1,2 +0,2 @@

import { TypeProperty } from "../propeties";
import { TypeProperty } from "../properties";
export declare class FormulaProcessor {

@@ -3,0 +3,0 @@ static processFormula(formula: string | undefined, data: any): number;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormulaProcessor = void 0;
const propeties_1 = require("../propeties");
const properties_1 = require("../properties");
class FormulaProcessor {

@@ -29,3 +29,3 @@ static processFormula(formula = '', data) {

properties.forEach(property => {
if (property.propertyType === propeties_1.PropertyType.Formula) {
if (property.propertyType === properties_1.PropertyType.Formula) {
entity[property.slug] = this.processFormula(property.formula, entity);

@@ -32,0 +32,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const propeties_1 = require("../propeties");
const properties_1 = require("../properties");
const formula_processor_1 = require("./formula-processor");

@@ -26,4 +26,4 @@ describe('FormulaProcessor', () => {

const properties = [
{ label: "Computed 1", slug: 'computed', formula: '{retailPrice}*{volume}-{retailPrice}', propertyType: propeties_1.PropertyType.Formula },
{ label: "Computed 2", slug: 'computed2', formula: '{retailPrice}*{volume}', propertyType: propeties_1.PropertyType.Formula },
{ label: "Computed 1", slug: 'computed', formula: '{retailPrice}*{volume}-{retailPrice}', propertyType: properties_1.PropertyType.Formula },
{ label: "Computed 2", slug: 'computed2', formula: '{retailPrice}*{volume}', propertyType: properties_1.PropertyType.Formula },
];

@@ -30,0 +30,0 @@ const entitiy = {

export * from './formatter';
export * from './propeties';
export * from './properties';
export * from './formulas';
export * from './types';

@@ -14,4 +14,4 @@ "use strict";

__exportStar(require("./formatter"), exports);
__exportStar(require("./propeties"), exports);
__exportStar(require("./properties"), exports);
__exportStar(require("./formulas"), exports);
__exportStar(require("./types"), exports);

@@ -1,2 +0,2 @@

import { TypeProperty } from "../propeties";
import { TypeProperty } from "../properties";
export interface Type {

@@ -3,0 +3,0 @@ slug?: string;

{
"name": "@contrail/types",
"version": "1.0.0",
"version": "1.0.1",
"description": "Types Utility module",

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

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