
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@incubateur-ademe/publicodes-commun
Advanced tools
Ensemble de règles communes utilisées pour l'implémentation des modèles
Ensemble de règles communes utilisées pour l'implémentation des modèles Publicodes.
yarn install publicodes-commun publicodes
// Install the dependencies
yarn install
// Compile the Publicodes rules
yarn run compile
// Run the tests
yarn run test
// Run the documentation server
yarn run doc
import { Engine } from 'publicodes'
import rules from 'publicodes-commun'
const engine = new Engine(rules)
console.log(engine.evaluate('mix électrique . empreinte carbone').nodeValue)
// 0.0519
yarn add -D publicodes-commun
Dans un fichier **.publicodes** :
importer!:
depuis:
nom: '@incubateur-ademe/publicodes-commun'
url: https://github.com/incubateur-ademe/publicodes-commun
dans: commun
les règles:
- mix électrique . empreinte carbone
- mois par an
Les règles ainsi importées seront accessibles et utilisables dans le modèle. Par exemple:
empreinte électricité:
formule: commun . mix électrique . empreinte carbone * commun . mois par an * 100 kWh/mois
FAQs
Ensemble de règles communes utilisées pour l'implémentation des modèles
We found that @incubateur-ademe/publicodes-commun demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.