
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
publicodes
Advanced tools
npm install publicodes
The library exports a default class Engine which allows you to instantiate an publicodes interpreter with a set of publicodes rules.
import Engine from 'publicodes'
import { parse as parseYaml } from 'yaml'
// We define a list of publicodes rules
const rules = `
dépenses primeur:
somme:
- 1.5 kg * 2€/kg # carottes
- 500g * 6€/kg # champignons
- 3 avocats * 1.5€/avocats
`
const parsedRules = parseYaml(rules)
const engine = new Engine(parsedRules)
const result = engine.evaluate('dépenses primeur')
FAQs
A declarative language for encoding public algorithm
We found that publicodes 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.