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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ruleforge/ruleforge

v0.2.0

Published

A library for adding rules to your app.

Downloads

6

Readme

RuleForge

A library for adding a rules engine to your web app

GitHub last commit GitHub issues GitHub package.json version (branch) GitHub contributors GitHub forks GitHub watchers GitHub Repo stars GitHub Sponsors GitHub

Create a rules engine for your app in minutes, that would take days to create from scratch.

Add complex rules to your web app quickly via simple commands to RuleForge's classes.

Features

  • A ready-built structure for organising your rules
  • An efficient engine for processing rules at scale
  • A simple structure that can be picked up easily
  • Create simple rulesets quickly via chaining with the RuleForge class
  • Fire actions from passed rules immediately, or en masse when you want to

Installation

RuleForge can be installed via Node Package Manager (NPM).

npm install @ruleforge/ruleforge

Documentation

Documentation can be found on the RuleForge GitHub Pages site here

Getting Started

A getting started guide will be added here soon, but in the meantime check out the example.ts and example2.ts files for two ways to get started.

There are a few different building blocks that make up RuleForge's rule engine. These are the five you will use, and what they are for:

  • Fact: An object you pass with your own properties to check your rules against.
  • Condition: An individual check you make on the Fact.
  • Rules: Contain the Conditions that must all be met for the Rule to pass.
  • Actions: The function you want to run when the Rule passes.
  • Ruleset: A container for your Rules.
  • RuleForge: A class that allows your rulesets to be created via chaining (see example2.ts)

In short:

  1. Create a ruleset.
  2. Create a rule in the ruleset.
  3. Create an action in the rule.
  4. Add conditions to the rule.
  5. Repeat 2-4 until you have all the rules you need.
  6. Create a fact, with the data you'll be checking your rules against.
  7. Run the fact through the ruleset.

Development

Want to contribute? Great!

We develop with GitHub

We use GitHub to host the code, track issues and feature requests, as well as accept pull requests.

  1. Fork the repository and create your own branch from main.
  2. Make sure your code lints.
  3. Issue that pull request!

Any contributions you make will be under the MIT Software Licence

In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project.

Write bugs using GitHub's issues

We use GitHub issues to track public bugs. Report a bug by opening an issue.

License

MIT