is-query-valid
v0.0.3
Published
Performs query validation on field/variable list
Downloads
4
Maintainers
Readme
is-query-valid
Performs query validation on field/variable list.
Validation includes brackets and double quotes
Get it
npm install --save is-query-valid
Usage
var isQueryValid = require('is-query-valid')
var arr = ['[absolutely]', ',[everybody]', ',[is]', ',[free]']
isQueryValid(arr, (err, isTrue) => {
if (err) throw err
console.log('Query Validator returns', isTrue)
})
// Query Validator returns true
API
isQueryValid(arr)
arr
string array
Returns true
if each matches query formatting rule and false
if not
Rule: Any word is enclosed by double quotation marks or opening and closing brackets.