logic-eval

1.1.0 • Public • Published

Usage:

import logicEval from 'logic-eval';

const expression = "id >= 1 && hour % 2 === 0";
const context = { id: 5, hour: 6 };
const result = logicEval.evaluateWithContext(expression, context);

// result should be true

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.01
1.0.20
1.0.11
1.0.01

Package Sidebar

Install

npm i logic-eval

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

1.17 MB

Total Files

17

Last publish

Collaborators

  • nhong