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
npm install pip-services3-expressions-nodex
Typescript
Module System
Min. Node Version
Node Version
NPM Version
78.3
Supply Chain
98.7
Quality
77.7
Maintenance
100
Vulnerability
100
License
TypeScript (97.97%)
PowerShell (2.03%)
Total Downloads
34,626
Last Day
4
Last Week
248
Last Month
1,554
Last Year
14,319
15 Commits
1 Forks
3 Watching
1 Branches
3 Contributors
Minified
Minified + Gzipped
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
Publised On
03 Apr 2023
Cumulative downloads
Total Downloads
Last day
-50%
4
Compared to previous day
Last week
23.4%
248
Compared to previous week
Last month
-74.8%
1,554
Compared to previous month
Last year
30%
14,319
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
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/15 approved changesets -- score normalized to 0
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 2024-12-16
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