1.0.3 • Published 6 years ago

validate-expression v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

validate-expression

Build Status

Install

$ npm install --save validate-expression

Usage

const { validateExpression } = require('validate-expression')

Example

const { validateExpression } = require('validate-expression')
let expression1 = '1&&2&3|4||5 & !(6|7)'
let expression2 = '1&&2&3|4||5! & !(6|7)'
let ret1 = validateExpression(expression1) //true
let ret2 = validateExpression(expression1, [1,2,3,4,5,6,7]) //true
let ret3 = validateExpression(expression1, [1,2,3,4,7]) //false
let ret4 = validateExpression(expression2) //false
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago