npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@o3r/rules-engine

v14.1.0

Published

This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.

Readme

This package is an Otter Framework Module.

Description

Stable Version Bundle Size

This module provides a rules engine that can run on your user's browser to customize the (translations, [//]: # (Should we target placeholder or the component npmjs, and we add a section on the placeholder there?) placeholders and configurations) of your application at runtime.

The rules engine interprets a list of actions to execute based on the evaluation of Rulesets and their conditions. Conditions are logical expressions relying on operators and variables we call facts.

You can store your list of Rulesets on a static JSON file.

This mechanism allows you to bring UI personalization based on runtime events without the need of a backend service. This can be useful if you want to drive dynamic behavior.

For example, you could consider leveraging this feature to display assets based on the current season or for some special events, or to drive A/B testing on your components.

You will find more information on the concepts behind the rules engine in its dedicated documentation. For a demonstration of the rules engine capabilities, you can refer to the live example in the Otter showcase.

How to install

ng add @o3r/rules-engine

[!WARNING] This module requires @o3r/core to be installed.

How to use

The package exposes the RulesEngineRunnerService that can drive all the Otter customization-based services in order to personalize the user experience. On its own, the service will do nothing and will need action handlers to register with the list of supported actions and their implementation.

Not only this allows for a better extensibility of the service, but it also keeps the number of imported module to the bare minimum for a lighter application.

Find more information on the Otter rules engine documentation.

Examples

Several examples of the rules engine usage are available on the following links:

Generators

Otter framework provides a set of code generators based on Angular schematics.

| Schematics | Description | How to use | |---------------------------|---------------------------------------------------------------|----------------------------------| | add | Include Otter rules-engine module in a library / application. | ng add @o3r/rules-engine | | rules-engine-to-component | Add rules-engine to an Otter component | ng g rules-engine-to-component | | facts-service | Generate a facts service | ng g facts-service | | operators | Generate an operator | ng g operator |

Debug

A whole section of the Otter Chrome Devtool extension is dedicated to the debug of the rules engine with a visual representation of your Rulesets and a history of the run, conditions met and actions applied.

Find more information on the tool in the Otter Chrome Devtool extension documentation and its dedicated section in the rules engine documentation.

External links

More details regarding the way the rules engine is working can be found in the documentation. A live example is available in the Otter Showcase Application with reference to its code source.