You've already forked search-query-parser
Removed module, tidied up docs
This commit is contained in:
17
docs/interfaces/_index_d_.isearchparserdictionary.md
Normal file
17
docs/interfaces/_index_d_.isearchparserdictionary.md
Normal file
@@ -0,0 +1,17 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [ISearchParserDictionary](../interfaces/_index_d_.isearchparserdictionary.md)
|
||||
|
||||
# Interface: ISearchParserDictionary
|
||||
|
||||
## Hierarchy
|
||||
|
||||
**ISearchParserDictionary**
|
||||
|
||||
↳ [SearchParserResult](_index_d_.searchparserresult.md)
|
||||
|
||||
## Indexable
|
||||
|
||||
\[key: `string`\]: `any`
|
||||
## Index
|
||||
|
||||
---
|
||||
|
||||
58
docs/interfaces/_index_d_.searchparseroffset.md
Normal file
58
docs/interfaces/_index_d_.searchparseroffset.md
Normal file
@@ -0,0 +1,58 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchParserOffset](../interfaces/_index_d_.searchparseroffset.md)
|
||||
|
||||
# Interface: SearchParserOffset
|
||||
|
||||
## Hierarchy
|
||||
|
||||
**SearchParserOffset**
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [keyword](_index_d_.searchparseroffset.md#keyword)
|
||||
* [offsetEnd](_index_d_.searchparseroffset.md#offsetend)
|
||||
* [offsetStart](_index_d_.searchparseroffset.md#offsetstart)
|
||||
* [value](_index_d_.searchparseroffset.md#value)
|
||||
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
<a id="keyword"></a>
|
||||
|
||||
### keyword
|
||||
|
||||
**● keyword**: *`string`*
|
||||
|
||||
*Defined in [index.d.ts:20](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L20)*
|
||||
|
||||
___
|
||||
<a id="offsetend"></a>
|
||||
|
||||
### offsetEnd
|
||||
|
||||
**● offsetEnd**: *`number`*
|
||||
|
||||
*Defined in [index.d.ts:23](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L23)*
|
||||
|
||||
___
|
||||
<a id="offsetstart"></a>
|
||||
|
||||
### offsetStart
|
||||
|
||||
**● offsetStart**: *`number`*
|
||||
|
||||
*Defined in [index.d.ts:22](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L22)*
|
||||
|
||||
___
|
||||
<a id="value"></a>
|
||||
|
||||
### `<Optional>` value
|
||||
|
||||
**● value**: *`string`*
|
||||
|
||||
*Defined in [index.d.ts:21](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L21)*
|
||||
|
||||
___
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchQueryParser](../modules/_index_d_.searchqueryparser.md) > [SearchParserOptions](../interfaces/_index_d_.searchqueryparser.searchparseroptions.md)
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchParserOptions](../interfaces/_index_d_.searchparseroptions.md)
|
||||
|
||||
# Interface: SearchParserOptions
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
### Properties
|
||||
|
||||
* [alwaysArray](_index_d_.searchqueryparser.searchparseroptions.md#alwaysarray)
|
||||
* [keywords](_index_d_.searchqueryparser.searchparseroptions.md#keywords)
|
||||
* [offsets](_index_d_.searchqueryparser.searchparseroptions.md#offsets)
|
||||
* [ranges](_index_d_.searchqueryparser.searchparseroptions.md#ranges)
|
||||
* [tokenize](_index_d_.searchqueryparser.searchparseroptions.md#tokenize)
|
||||
* [alwaysArray](_index_d_.searchparseroptions.md#alwaysarray)
|
||||
* [keywords](_index_d_.searchparseroptions.md#keywords)
|
||||
* [offsets](_index_d_.searchparseroptions.md#offsets)
|
||||
* [ranges](_index_d_.searchparseroptions.md#ranges)
|
||||
* [tokenize](_index_d_.searchparseroptions.md#tokenize)
|
||||
|
||||
---
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
**● alwaysArray**: *`boolean`*
|
||||
|
||||
*Defined in [index.d.ts:13](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L13)*
|
||||
*Defined in [index.d.ts:12](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L12)*
|
||||
|
||||
___
|
||||
<a id="keywords"></a>
|
||||
@@ -35,7 +35,7 @@ ___
|
||||
|
||||
**● keywords**: *`string`[]*
|
||||
|
||||
*Defined in [index.d.ts:11](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L11)*
|
||||
*Defined in [index.d.ts:10](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L10)*
|
||||
|
||||
___
|
||||
<a id="offsets"></a>
|
||||
@@ -44,7 +44,7 @@ ___
|
||||
|
||||
**● offsets**: *`boolean`*
|
||||
|
||||
*Defined in [index.d.ts:9](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L9)*
|
||||
*Defined in [index.d.ts:8](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L8)*
|
||||
|
||||
___
|
||||
<a id="ranges"></a>
|
||||
@@ -53,7 +53,7 @@ ___
|
||||
|
||||
**● ranges**: *`string`[]*
|
||||
|
||||
*Defined in [index.d.ts:12](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L12)*
|
||||
*Defined in [index.d.ts:11](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L11)*
|
||||
|
||||
___
|
||||
<a id="tokenize"></a>
|
||||
@@ -62,7 +62,7 @@ ___
|
||||
|
||||
**● tokenize**: *`boolean`*
|
||||
|
||||
*Defined in [index.d.ts:10](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L10)*
|
||||
*Defined in [index.d.ts:9](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L9)*
|
||||
|
||||
___
|
||||
|
||||
53
docs/interfaces/_index_d_.searchparserresult.md
Normal file
53
docs/interfaces/_index_d_.searchparserresult.md
Normal file
@@ -0,0 +1,53 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchParserResult](../interfaces/_index_d_.searchparserresult.md)
|
||||
|
||||
# Interface: SearchParserResult
|
||||
|
||||
## Hierarchy
|
||||
|
||||
[ISearchParserDictionary](_index_d_.isearchparserdictionary.md)
|
||||
|
||||
**↳ SearchParserResult**
|
||||
|
||||
## Indexable
|
||||
|
||||
\[key: `string`\]: `any`
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [exclude](_index_d_.searchparserresult.md#exclude)
|
||||
* [offsets](_index_d_.searchparserresult.md#offsets)
|
||||
* [text](_index_d_.searchparserresult.md#text)
|
||||
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
<a id="exclude"></a>
|
||||
|
||||
### `<Optional>` exclude
|
||||
|
||||
**● exclude**: *[ISearchParserDictionary](_index_d_.isearchparserdictionary.md)*
|
||||
|
||||
*Defined in [index.d.ts:29](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L29)*
|
||||
|
||||
___
|
||||
<a id="offsets"></a>
|
||||
|
||||
### `<Optional>` offsets
|
||||
|
||||
**● offsets**: *[SearchParserOffset](_index_d_.searchparseroffset.md)[]*
|
||||
|
||||
*Defined in [index.d.ts:28](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L28)*
|
||||
|
||||
___
|
||||
<a id="text"></a>
|
||||
|
||||
### `<Optional>` text
|
||||
|
||||
**● text**: *`string` \| `string`[]*
|
||||
|
||||
*Defined in [index.d.ts:27](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L27)*
|
||||
|
||||
___
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchQueryParser](../modules/_index_d_.searchqueryparser.md) > [ISearchParserDictionary](../interfaces/_index_d_.searchqueryparser.isearchparserdictionary.md)
|
||||
|
||||
# Interface: ISearchParserDictionary
|
||||
|
||||
## Hierarchy
|
||||
|
||||
**ISearchParserDictionary**
|
||||
|
||||
↳ [SearchParserResult](_index_d_.searchqueryparser.searchparserresult.md)
|
||||
|
||||
## Indexable
|
||||
|
||||
\[key: `string`\]: `any`
|
||||
## Index
|
||||
|
||||
---
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchQueryParser](../modules/_index_d_.searchqueryparser.md) > [SearchParserOffset](../interfaces/_index_d_.searchqueryparser.searchparseroffset.md)
|
||||
|
||||
# Interface: SearchParserOffset
|
||||
|
||||
## Hierarchy
|
||||
|
||||
**SearchParserOffset**
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [keyword](_index_d_.searchqueryparser.searchparseroffset.md#keyword)
|
||||
* [offsetEnd](_index_d_.searchqueryparser.searchparseroffset.md#offsetend)
|
||||
* [offsetStart](_index_d_.searchqueryparser.searchparseroffset.md#offsetstart)
|
||||
* [value](_index_d_.searchqueryparser.searchparseroffset.md#value)
|
||||
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
<a id="keyword"></a>
|
||||
|
||||
### keyword
|
||||
|
||||
**● keyword**: *`string`*
|
||||
|
||||
*Defined in [index.d.ts:21](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L21)*
|
||||
|
||||
___
|
||||
<a id="offsetend"></a>
|
||||
|
||||
### offsetEnd
|
||||
|
||||
**● offsetEnd**: *`number`*
|
||||
|
||||
*Defined in [index.d.ts:24](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L24)*
|
||||
|
||||
___
|
||||
<a id="offsetstart"></a>
|
||||
|
||||
### offsetStart
|
||||
|
||||
**● offsetStart**: *`number`*
|
||||
|
||||
*Defined in [index.d.ts:23](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L23)*
|
||||
|
||||
___
|
||||
<a id="value"></a>
|
||||
|
||||
### `<Optional>` value
|
||||
|
||||
**● value**: *`string`*
|
||||
|
||||
*Defined in [index.d.ts:22](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L22)*
|
||||
|
||||
___
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchQueryParser](../modules/_index_d_.searchqueryparser.md) > [SearchParserResult](../interfaces/_index_d_.searchqueryparser.searchparserresult.md)
|
||||
|
||||
# Interface: SearchParserResult
|
||||
|
||||
## Hierarchy
|
||||
|
||||
[ISearchParserDictionary](_index_d_.searchqueryparser.isearchparserdictionary.md)
|
||||
|
||||
**↳ SearchParserResult**
|
||||
|
||||
## Indexable
|
||||
|
||||
\[key: `string`\]: `any`
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [exclude](_index_d_.searchqueryparser.searchparserresult.md#exclude)
|
||||
* [offsets](_index_d_.searchqueryparser.searchparserresult.md#offsets)
|
||||
* [text](_index_d_.searchqueryparser.searchparserresult.md#text)
|
||||
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
<a id="exclude"></a>
|
||||
|
||||
### `<Optional>` exclude
|
||||
|
||||
**● exclude**: *[ISearchParserDictionary](_index_d_.searchqueryparser.isearchparserdictionary.md)*
|
||||
|
||||
*Defined in [index.d.ts:30](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L30)*
|
||||
|
||||
___
|
||||
<a id="offsets"></a>
|
||||
|
||||
### `<Optional>` offsets
|
||||
|
||||
**● offsets**: *[SearchParserOffset](_index_d_.searchqueryparser.searchparseroffset.md)[]*
|
||||
|
||||
*Defined in [index.d.ts:29](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L29)*
|
||||
|
||||
___
|
||||
<a id="text"></a>
|
||||
|
||||
### `<Optional>` text
|
||||
|
||||
**● text**: *`string` \| `string`[]*
|
||||
|
||||
*Defined in [index.d.ts:28](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L28)*
|
||||
|
||||
___
|
||||
|
||||
@@ -4,9 +4,37 @@
|
||||
|
||||
## Index
|
||||
|
||||
### Modules
|
||||
### Interfaces
|
||||
|
||||
* [SearchQueryParser](_index_d_.searchqueryparser.md)
|
||||
* [ISearchParserDictionary](../interfaces/_index_d_.isearchparserdictionary.md)
|
||||
* [SearchParserOffset](../interfaces/_index_d_.searchparseroffset.md)
|
||||
* [SearchParserOptions](../interfaces/_index_d_.searchparseroptions.md)
|
||||
* [SearchParserResult](../interfaces/_index_d_.searchparserresult.md)
|
||||
|
||||
### Functions
|
||||
|
||||
* [parse](_index_d_.md#parse)
|
||||
|
||||
---
|
||||
|
||||
## Functions
|
||||
|
||||
<a id="parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
▸ **parse**(string: *`string`*, options?: *[SearchParserOptions](../interfaces/_index_d_.searchparseroptions.md)*): `string` \| [SearchParserResult](../interfaces/_index_d_.searchparserresult.md)
|
||||
|
||||
*Defined in [index.d.ts:32](https://github.com/rtrvrtg/search-query-parser/blob/e4a7ccc/index.d.ts#L32)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| string | `string` |
|
||||
| `Optional` options | [SearchParserOptions](../interfaces/_index_d_.searchparseroptions.md) |
|
||||
|
||||
**Returns:** `string` \| [SearchParserResult](../interfaces/_index_d_.searchparserresult.md)
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
[search-query-parser](../README.md) > ["index.d"](../modules/_index_d_.md) > [SearchQueryParser](../modules/_index_d_.searchqueryparser.md)
|
||||
|
||||
# Module: SearchQueryParser
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
|
||||
* [ISearchParserDictionary](../interfaces/_index_d_.searchqueryparser.isearchparserdictionary.md)
|
||||
* [SearchParserOffset](../interfaces/_index_d_.searchqueryparser.searchparseroffset.md)
|
||||
* [SearchParserOptions](../interfaces/_index_d_.searchqueryparser.searchparseroptions.md)
|
||||
* [SearchParserResult](../interfaces/_index_d_.searchqueryparser.searchparserresult.md)
|
||||
|
||||
### Functions
|
||||
|
||||
* [parse](_index_d_.searchqueryparser.md#parse)
|
||||
|
||||
---
|
||||
|
||||
## Functions
|
||||
|
||||
<a id="parse"></a>
|
||||
|
||||
### parse
|
||||
|
||||
▸ **parse**(string: *`string`*, options?: *[SearchParserOptions](../interfaces/_index_d_.searchqueryparser.searchparseroptions.md)*): `string` \| [SearchParserResult](../interfaces/_index_d_.searchqueryparser.searchparserresult.md)
|
||||
|
||||
*Defined in [index.d.ts:33](https://github.com/rtrvrtg/search-query-parser/blob/5612d18/index.d.ts#L33)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| string | `string` |
|
||||
| `Optional` options | [SearchParserOptions](../interfaces/_index_d_.searchqueryparser.searchparseroptions.md) |
|
||||
|
||||
**Returns:** `string` \| [SearchParserResult](../interfaces/_index_d_.searchqueryparser.searchparserresult.md)
|
||||
|
||||
___
|
||||
|
||||
52
index.d.ts
vendored
52
index.d.ts
vendored
@@ -4,31 +4,29 @@
|
||||
// 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;
|
||||
keywords?: string[];
|
||||
ranges?: string[];
|
||||
alwaysArray?: boolean;
|
||||
}
|
||||
|
||||
export interface ISearchParserDictionary {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface SearchParserOffset {
|
||||
keyword: string;
|
||||
value?: string;
|
||||
offsetStart: number;
|
||||
offsetEnd: number;
|
||||
}
|
||||
|
||||
export interface SearchParserResult extends ISearchParserDictionary {
|
||||
text?: string | string[];
|
||||
offsets?: SearchParserOffset[];
|
||||
exclude?: ISearchParserDictionary;
|
||||
}
|
||||
|
||||
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;
|
||||
export interface SearchParserOptions {
|
||||
offsets?: boolean;
|
||||
tokenize?: boolean;
|
||||
keywords?: string[];
|
||||
ranges?: string[];
|
||||
alwaysArray?: boolean;
|
||||
}
|
||||
|
||||
export interface ISearchParserDictionary {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface SearchParserOffset {
|
||||
keyword: string;
|
||||
value?: string;
|
||||
offsetStart: number;
|
||||
offsetEnd: number;
|
||||
}
|
||||
|
||||
export interface SearchParserResult extends ISearchParserDictionary {
|
||||
text?: string | string[];
|
||||
offsets?: SearchParserOffset[];
|
||||
exclude?: ISearchParserDictionary;
|
||||
}
|
||||
|
||||
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;
|
||||
|
||||
Reference in New Issue
Block a user