You've already forked search-query-parser
Updated README, fleshed out types doc a bit more
This commit is contained in:
@@ -114,6 +114,10 @@ var parsedQueryWithOptions = searchQuery.parse(query, options);
|
|||||||
|
|
||||||
The offsets object could become pretty huge with long search queries which could be an unnecessary use of space if no functionality depends on it. It can simply be turned off using the option `offsets: false`
|
The offsets object could become pretty huge with long search queries which could be an unnecessary use of space if no functionality depends on it. It can simply be turned off using the option `offsets: false`
|
||||||
|
|
||||||
|
## Typescript
|
||||||
|
|
||||||
|
Typescript types are available for this library.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
The 29 tests are written using the BDD testing framework should.js, and run with mocha.
|
The 29 tests are written using the BDD testing framework should.js, and run with mocha.
|
||||||
|
|||||||
8
index.d.ts
vendored
8
index.d.ts
vendored
@@ -1,3 +1,10 @@
|
|||||||
|
// @file
|
||||||
|
// Type definitions for search-query-parser.
|
||||||
|
// Project: https://github.com/nepsilon/search-query-parser
|
||||||
|
// Definitions by: Geoffrey Roberts <g.roberts@blackicemedia.com>
|
||||||
|
// Definitions: https://github.com/nepsilon/search-query-parser
|
||||||
|
|
||||||
|
export module SearchQueryParser {
|
||||||
export interface SearchParserOptions {
|
export interface SearchParserOptions {
|
||||||
offsets?: boolean;
|
offsets?: boolean;
|
||||||
tokenize?: boolean;
|
tokenize?: boolean;
|
||||||
@@ -24,3 +31,4 @@ export interface SearchParserResult extends ISearchParserDictionary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;
|
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user