Gathering detailed insights and metrics for pip-services3-expressions-nodex
Gathering detailed insights and metrics for pip-services3-expressions-nodex
Gathering detailed insights and metrics for pip-services3-expressions-nodex
Gathering detailed insights and metrics for pip-services3-expressions-nodex
Tokenizers, parsers and expression calculators for Pip.Services in Node.js / ES2017
npm install pip-services3-expressions-nodex
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.97%)
PowerShell (2.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
15 Commits
1 Forks
2 Watchers
1 Branches
3 Contributors
Updated on May 30, 2022
Latest Version
1.0.4
Package Id
pip-services3-expressions-nodex@1.0.4
Unpacked Size
832.23 kB
Size
118.44 kB
File Count
392
NPM Version
9.5.0
Node Version
18.15.0
Published on
Apr 03, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
5
This module is a part of the Pip.Services polyglot microservices toolkit. It provides syntax and lexical analyzers and expression calculator optimized for repeated calculations.
The module contains the following packages:
Install the NPM package as
1npm install pip-services3-expressions-nodex --save
The example below shows how to use expression calculator to dynamically calculate user-defined expressions.
1import { IConfigurable } from 'pip-services3-commons-nodex'; 2import { ConfigParams } from 'pip-services3-commons-nodex'; 3import { IReferenceable } from 'pip-services3-commons-nodex'; 4import { IReferences } from 'pip-services3-commons-nodex'; 5import { Descriptor } from 'pip-services3-commons-nodex'; 6import { IOpenable } from 'pip-services3-commons-nodex'; 7 8... 9let calculator = new ExpressionCalculator(); 10 11calculator.expression = "A + b / (3 - Max(-123, 1)*2)"; 12 13let vars = new VariableCollection(); 14vars.add(new Variable("A", new Variant(1))); 15vars.add(new Variable("B", new Variant("3"))); 16 17let result = await calculator.evaluateWithVariables(vars); 18console.log("The result of the expression is " + result.asString); 19...
This is an example to process mustache templates.
1let mustache = new MustacheTemplate(); 2mustache.template = "Hello, {{{NAME}}}{{#ESCLAMATION}}!{{/ESCLAMATION}}{{#unless ESCLAMATION}}.{{/unless}}"; 3let result = mustache.evaluateWithVariables({ NAME: 'Mike', ESCLAMATION: true }); 4console.log("The result of template evaluation is '" + result + "'");
For development you shall install the following prerequisites:
Install dependencies:
1npm install
Compile the code:
1tsc
Run automated tests:
1npm test
Generate API documentation:
1./docgen.ps1
Before committing changes run dockerized build and test as:
1./build.ps1 2./test.ps1 3./clear.ps1
The module is created and maintained by Sergey Seroukhov.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More