You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@adobe/aep-rules-engine

Package Overview
Dependencies
Maintainers
30
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aep-rules-engine

Adobe Experience Platform rules engine.

3.1.1
latest
Source
npmnpm
Version published
Maintainers
30
Created
Source

AEP Rules Engine

Overview

A simple, generic, extensible Rules Engine in TypeScript.

Installation

Although written in TypeScript, the build produces JavaScript implementations that can be used anywhere JavaScript can be evaluated.

Install via npm.

npm install @adobe/aep-rules-engine

Usage

const RulesEngine = require("@adobe/aep-rules-engine");

const ruleset = RulesEngine({
  version: 1,
  rules: [
    {
      condition: {
        definition: {
          conditions: [
            {
              definition: {
                conditions: [
                  {
                    definition: {
                      key: "color",
                      matcher: "eq",
                      values: ["orange", "blue"],
                    },
                    type: "matcher",
                  },
                ],
                logic: "and",
              },
              type: "group",
            },
          ],
          logic: "and",
        },
        type: "group",
      },
      consequences: [
        {
          type: "item",
          detail: {
            hello: "world",
          },
          id: "abc123",
        },
      ],
    },
  ],
});

const consequences = ruleset.execute({ color: "orange" });

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

FAQs

Package last updated on 28 May 2025

Did you know?

Socket

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.

Install

Related posts