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

evopolicychecker

v1.0.0

Published

A secure, offline, deterministic policy evaluation engine.

Readme

EvoPolicy SDK

npm version License

EvoPolicy is a high-performance, deterministic authorization engine tailored for enterprise Node.js and TypeScript ecosystems. It facilitates advanced attribute-based access control (ABAC) and role-based access control (RBAC) by evaluating policies locally within the application process. This architecture eliminates network latency and central service dependency while maintaining a robust security posture.


Technical Value Proposition

In large-scale distributed systems, authorization logic often becomes fragmented or creates performance bottlenecks due to network-based policy lookups. EvoPolicy addresses these fundamental challenges through:

  1. Sub-Millisecond Evaluation: Policies are processed in-memory. Standard decision cycles complete in under 100 microseconds, ensuring critical paths remain high-speed.
  2. Universal Data Interfacing: The engine is decoupled from storage. It supports seamless ingestion from local configuration (JSON/YAML), relational clusters (MySQL, PostgreSQL), and distributed NoSQL/API sources (MongoDB, GraphQL).
  3. Auditable Condition Logic: A formal recursive descent parser evaluates complex constraints without unsafe script execution.
  4. Security Fail-Closed Design: The SDK enforces a strict denial policy in cases of initialization failure or ambiguous rule sets.

Enterprise System Architecture

The following diagram illustrates the integration of various policy sources and the internal decision logic flow.

EvoPolicy Enterprise Architecture

Architectural Components

  • Logic Engine: Orchestrates the filtering and matching of policies against the evaluation context.
  • IPolicyLoader Abstraction: An extensible interface for implementing custom data persistence strategies.
  • Condition Parser: A secure, non-evaluative parser that validates resource and subject attributes.
  • Decision Matrix: Applies Deny-Overrides logic to deliver a final authorization verdict.

Installation

npm install evopolicychecker

Technical Implementation Guide

Engine Initialization and Data Ingestion

The engine supports multiple loading strategies, allow for both static and dynamic policy management.

import { PolicyEngine, JsonPolicyLoader, CustomPolicyLoader } from 'evopolicychecker';

const engine = new PolicyEngine();

// Static file ingestion
engine.loadPolicies('./config/access_rules.json');

// Dynamic Database Integration
const fetcher = async () => {
    // Implement database-specific retrieval logic
    return await database.authorizations.findMany();
};
await engine.loadFromLoader(new CustomPolicyLoader(fetcher));

Advanced Connection Patterns

For detailed implementation and copy-paste examples for MySQL, MongoDB, PostgreSQL, and GraphQL, please refer to the Database Integration Specification.

Middleware Lifecycle Integration

EvoPolicy provides standardized middleware for Express.js to facilitate request-level authorization.

import { policyMiddleware } from 'evopolicychecker';

// Global middleware with automatic context mapping
app.use(policyMiddleware(engine));

// Granular route protection with explicit context mapping
app.post('/v1/assets/restricted', policyMiddleware(engine, (req) => ({
    subject: req.authenticatedUser,
    action: 'administer',
    resource: {
        type: 'restricted_asset',
        id: req.params.id,
        classification: req.body.level
    }
})));

Condition Operator Specification

| Operator | Categorization | Evaluation Logic | | :--- | :--- | :--- | | > , < , >= , <= | Range | Arithmetic and Chronological Comparison (ISO-8601 compatible) | | ~= | Pattern | Regular Expression matching (ECMAScript compatible) | | IN [...] | Set | Inclusion check within discrete arrays | | != | Logic | Strict inequality validation |


Performance Benchmarks

  • Memory Efficiency: < 50MB baseline.
  • Evaluation Throughput: 100k+ operations per second.
  • Initialization Speed: ~10ms for 1,000 policy records.

For deeper insights into the internal evaluation logic and security hardening, consult the Architectural Specification.

Licensed under the ISC License. Copyright © 2026 Daksha Dubey.