search-query-parser
Advanced tools
Comparing version 0.0.4 to 1.0.0
@@ -14,2 +14,6 @@ /*! | ||
if (!string) { | ||
string = ''; | ||
} | ||
// Regularize white spacing | ||
@@ -56,3 +60,3 @@ // Make in-between white spaces a unique space | ||
} | ||
}; | ||
} | ||
// Reverse to ensure proper order when pop()'ing. | ||
@@ -104,3 +108,3 @@ terms.reverse(); | ||
// value in an array | ||
query[key] = [query[key]] | ||
query[key] = [query[key]]; | ||
query[key].push(value); | ||
@@ -107,0 +111,0 @@ } |
{ | ||
"name": "search-query-parser", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"description": "Parser for advanced search query syntax", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -56,2 +56,16 @@ # Search Query Syntax Parser | ||
If no keywords or ranges are specified, or if none are present in the given search query, then `searchQuery.parse` will return a string. | ||
```javascript | ||
var searchQuery = require('search-query-parser'); | ||
var query = 'a query with just text'; | ||
var parsedQuery = searchQuery.parse(query); | ||
// parsedQuery is now 'a query with just text' | ||
var options = {keywords: ['unused']}; | ||
var parsedQueryWithOptions = searchQuery.parse(query, options); | ||
// parsedQueryWithOptions is now 'a query with just text' | ||
``` | ||
## Testing | ||
@@ -58,0 +72,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
149579
5380
0
101