1
0

Updated README, fleshed out types doc a bit more

This commit is contained in:
Geoffrey Roberts
2019-03-06 11:06:50 +11:00
parent fec29af546
commit 5612d18669
2 changed files with 34 additions and 22 deletions

View File

@@ -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`
## Typescript
Typescript types are available for this library.
## Testing
The 29 tests are written using the BDD testing framework should.js, and run with mocha.

8
index.d.ts vendored
View File

@@ -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 {
offsets?: boolean;
tokenize?: boolean;
@@ -24,3 +31,4 @@ export interface SearchParserResult extends ISearchParserDictionary {
}
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;
}