Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 323 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 323 Bytes

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...