Skip to content

dorik/dynamic-condition

Repository files navigation

Install

npm i -s dynamic-condition

Is it a doc?

import condition from 'dynamic-condition'

const statement = [["5", "==", 5], "&&", ["1", "==", true]];
// equivalent to (("5" == 5) && ("1" == true))

if (condition(statement).matches) {
  // do stuff
}

More detailed documentation coming soon...

About

[WIP] Dynamically evaluate an array of conditions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published