1.0.0 • Published 8 months ago

human-conditions v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

human-conditions

An AI-powered library that evaluates natural language conditions against your data objects. Simplify decision-making with human-readable queries like "is on a paid subscription plan" or "has admin permissions."

Features

  • Parse human-readable conditions into actionable logic.
  • Supports customizable data objects.
  • Lightweight and extensible.

Installation

yarn add human-conditions

Usage Example

import { check } from 'human-conditions';

const user = {
  id: '12345',
  name: 'Alex Doe',
  email: 'alex.doe@example.com',
  billingPlan: {
    plan: 'premium',
    planName: 'Premium Plan',
    startDate: '2024-01-01',
    renewalDate: '2025-01-01',
    amount: 99.99,
    currency: 'USD',
  },
};

const isOnPaidPlan = await check('is on a paid plan', user);
1.0.0

8 months ago