config redirect

This commit is contained in:
Nuno Coração
2023-01-29 22:30:24 +00:00
parent 17557c7d73
commit 5fb4bd8083
9905 changed files with 1258996 additions and 36355 deletions

326
node_modules/fuse.js/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,326 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [6.6.2](https://github.com/krisk/Fuse/compare/v6.6.1...v6.6.2) (2022-05-11)
### Bug Fixes
* value fetched at the end must be a string ([1de1dff](https://github.com/krisk/Fuse/commit/1de1dffa3f16992e21d817370e2b5d9611d3ad6d)), closes [#661](https://github.com/krisk/Fuse/issues/661)
### [6.6.1](https://github.com/krisk/Fuse/compare/v6.6.0...v6.6.1) (2022-05-06)
### Bug Fixes
* getFn to FuseOptionKeyObject ([80b87a9](https://github.com/krisk/Fuse/commit/80b87a9035b3dcecc92dc913ceb160045e1a95bd)), closes [#655](https://github.com/krisk/Fuse/issues/655)
* **typescript:** type definition for `FuseOptionKeyObject, fixes [#655](https://github.com/krisk/Fuse/issues/655) ([4acabb6](https://github.com/krisk/Fuse/commit/4acabb686f9a1a95adc766bc2fb387c0ce0b477c))
* **typescript:** type definition for FuseOptionKeyObject ([0a790b5](https://github.com/krisk/Fuse/commit/0a790b516efec2e6c5539bdd40d04889e6252dfe)), closes [#655](https://github.com/krisk/Fuse/issues/655) [#656](https://github.com/krisk/Fuse/issues/656)
## [6.6.0](https://github.com/krisk/Fuse/compare/v6.5.3...v6.6.0) (2022-05-03)
### Features
* allow passing getFn for a specific key ([1d445b9](https://github.com/krisk/Fuse/commit/1d445b9999e26d6eefecbdd333d46be01aff06e5)), closes [#627](https://github.com/krisk/Fuse/issues/627)
### Bug Fixes
* excessive splitting in parseQuery ([2c78022](https://github.com/krisk/Fuse/commit/2c78022c6ccb424e1013dc486649a7d6388df193))
* type mismatch on toJSON ([f5425ea](https://github.com/krisk/Fuse/commit/f5425ea1bd6b95eae912b8dab68c9e3cac0ad27f))
### [6.5.3](https://github.com/krisk/Fuse/compare/v6.5.2...v6.5.3) (2021-12-23)
### Bug Fixes
* **logical:** scoring for logical OR ([6f6af51](https://github.com/krisk/Fuse/commit/6f6af51cc39058fafea6b126f7120afc4f7c192a)), closes [#593](https://github.com/krisk/Fuse/issues/593)
### [6.5.2](https://github.com/krisk/Fuse/compare/v6.5.1...v6.5.2) (2021-12-23)
### [6.5.1](https://github.com/krisk/Fuse/compare/v6.5.0...v6.5.1) (2021-12-23)
### Bug Fixes
* rollback min node version ([9918f67](https://github.com/krisk/Fuse/commit/9918f67ba9b6b9b54e53576312fa33a51f428a9d))
## [6.5.0](https://github.com/krisk/Fuse/compare/v6.4.6...v6.5.0) (2021-12-22)
### Features
* **scoring:** field length norm weight ([a9e0080](https://github.com/krisk/Fuse/commit/a9e00804497a1bfd7a94040520417825c085c945))
### Bug Fixes
* **typescript:** add config declaration to types ([2f4de0c](https://github.com/krisk/Fuse/commit/2f4de0c5ce061808f460de7f399b56a06539d4d5))
### [6.4.6](https://github.com/krisk/Fuse/compare/v6.4.5...v6.4.6) (2021-01-05)
### Bug Fixes
* **typescript:** fix search typings ([94766b2](https://github.com/krisk/Fuse/commit/94766b2ffcc2be0e5f15daa9a29cd92adbe2647a)), closes [#527](https://github.com/krisk/Fuse/issues/527)
### [6.4.5](https://github.com/krisk/Fuse/compare/v6.4.4...v6.4.5) (2021-01-01)
### Bug Fixes
* **ts:** export FuseIndex type ([2e60bee](https://github.com/krisk/Fuse/commit/2e60bee242c7b82f0d014a3a35281b34bc6b62fb)), closes [#519](https://github.com/krisk/Fuse/issues/519)
### [6.4.4](https://github.com/krisk/Fuse/compare/v6.4.3...v6.4.4) (2020-12-29)
### Bug Fixes
* **extended:** correctly score include-match results ([443c863](https://github.com/krisk/Fuse/commit/443c863c44a48225510057d7597cb743fda2d25f)), closes [#522](https://github.com/krisk/Fuse/issues/522)
### [6.4.3](https://github.com/krisk/Fuse/compare/v6.4.2...v6.4.3) (2020-10-30)
### Bug Fixes
* **extended:** ignoreLocation when useExtendedSearch is true ([8f67ac9](https://github.com/krisk/Fuse/commit/8f67ac985d3440c20d93ce1e1c5ba66f384ea9bf)), closes [#465](https://github.com/krisk/Fuse/issues/465)
### [6.4.2](https://github.com/krisk/Fuse/compare/v6.4.1...v6.4.2) (2020-10-20)
### Bug Fixes
* if null in array ([740a500](https://github.com/krisk/Fuse/commit/740a5004763d84b285075a2cece4f37bc5fa2830))
### [6.4.1](https://github.com/krisk/Fuse/compare/v6.4.0...v6.4.1) (2020-07-26)
### Bug Fixes
* handle booleans in the data ([226d868](https://github.com/krisk/Fuse/commit/226d868a1102402e1e773db305ddd3928ae92f79)), closes [#469](https://github.com/krisk/Fuse/issues/469)
## [6.4.0](https://github.com/krisk/Fuse/compare/v6.3.1...v6.4.0) (2020-06-28)
### Features
* **extended:** add ability to search actual exact string ([350283f](https://github.com/krisk/Fuse/commit/350283f45a9affe05c6b3176bb5a5a037916de58))
### [6.3.1](https://github.com/krisk/Fuse/compare/v6.3.0...v6.3.1) (2020-06-24)
### Bug Fixes
* **logical:** scores in logical query operators are ignored ([e357229](https://github.com/krisk/Fuse/commit/e357229846fff585707903c93f556d1562fbabba)), closes [#449](https://github.com/krisk/Fuse/issues/449)
## [6.3.0](https://github.com/krisk/Fuse/compare/v6.2.1...v6.3.0) (2020-06-23)
### Features
* provide alternative array notation for nested paths ([7077fbe](https://github.com/krisk/Fuse/commit/7077fbe5f40872f9555645dbad2e6729ca55a5d4)), closes [#432](https://github.com/krisk/Fuse/issues/432)
### Bug Fixes
* **typescript:** add types for string and object together for the key property ([85fb211](https://github.com/krisk/Fuse/commit/85fb211a22bf5921ecefab9ecf3f8e2647f46b49))
* **typescript:** add typing for nested paths with array notation ([dfa4823](https://github.com/krisk/Fuse/commit/dfa48238f9a28600fd36677f958f43bb3cab4c03))
# Version 6.0.0
- Added [logical query expressions](https://fusejs.io/api/query.html) (#411)
- Added ability to dynamically add/remove items (#412)
- Mix different `options:key` types during intialization (#413)
- Improved indexing performances, as well storage savings (#405, #407)
# Version 5.2.0
- Addresses #390, #376, #382, #385
- Removed ngram search and extended bitap to search long patterns
# Version 5.0.9-beta
- Fixed Fuse global name. Erroenously set as 'Fuse.js'
# Version 5.0.8-beta
- Changed bundler to Rollup.
- Added ES6 modules for bundlers and browsers (`fuse.esm.js`) (fixed [#262](#262))
- Added CommonJS builds (`fuse.common.js`)
## Breaking Changes
- The minimified version is finally actually called `fuse.min.js`
# Version 5.0.7-beta
- Fixed (#363)
# Version 5.0.6-beta
- Fixed (#357)
# Version 5.0.3-beta
- A couple of fixes, courtesy of [Daniel Dickinson](https://github.com/cshoredaniel):
- Generate multiple targets with webpack (#359)
- Fixed TypeError (#360)
# Version 5.0.2-beta
- Added indexing for increased performance over large lists
- Added `Fuse.createIndex`, which created and returns an index. This function can be used to pre-generate the index, which you can then save, and ultimately pass to the `Fuse` instance.
## Breaking Changes
- Removed `id` option
- Changed format of the search results
- Updated TypeScript definitions
# Version 5.0.1-beta
- Removed `matchAllTokens` option.
# Version 5.0.0-beta
- Added ability to search patterns longer > 32 characters
- Removed `maxPatternLength` option
# Version 4.1.0-beta
- Perf optimization on nested array search
# Version 4.0.4-beta
- Re-added license information
# Version 4.0.3-beta
- Increased Node version
# Version 4.0.2-beta
- Added missing tests
# Version 4.0.1-beta
- Removed unused codepath
- Fixed case sensititivity check
- Upgraded dev dependencies
# Version 4.0.0-beta
- Added extended search [Discussion](https://github.com/krisk/Fuse/issues/356)
- Removed tokenization [Discussion](https://github.com/krisk/Fuse/issues/355)
# Version 3.6.0
- Improved error handling for keys
# Version 3.5.0
- Fixed #341, adjusting weights into the calculation
- Improved performance by ~10% (really can only be seen when you have 10k+ items)
# Version 3.4.3
- Fixed #261
- Rewrote tests to Jest framework
- Wrote tests for TypeScript typings
- Cleanup build
# Version 3.4.2
- Fixed #288
# Version 3.4.1
- Ensured `dist/` content is production ready (both full and min versions) #283
# Version 3.4.0
- Upgraded build tool to Webpack 4. New `dist/` output.
# Version 3.3.1
- Fixed the circular JSON TypeError (#197). Thanks [ThinkTankShark](https://github.com/ThinkTankShark)!
# Version 3.2.1
- Fixed issue in which more fuzzy matches would weaken a score instead of strengthening it (#233)
# Version 3.2.0
- Give better result for exact match when using weighted keys (#192)
# Version 3.1.0
- Added match index location for array key (#183)
- Allow searching deep nested numbers (#189)
# Version 3.0.5
- Escape special characters in search pattern (#168)
# Version 3.0.4
- Random bug fixes (#162)
# Version 3.0.0
- Removed Bower support
- Modified library into a more more palatable architecture, where the Bitap portion is now its own separate module.
### BREAKING CHANGES
- Removed `include` option in favor of more explicit booleans: `includeScore` and `includeMatches`. Both are `false` by default.
- Removed `searchFn` option, as this (for now) will remain a Bitap based solution
# Version 2.7.4
- Reverted to previous version, thus fixing breaking changes (a little bit of a version match here)
# Version 2.6.2
- Revert back to previous version
# Version 2.6.2
- Fix typings based on TypeScript guidelines (#129)
# Version 2.6.0
- Added Typescript definition
- Added ability to set min/max matched character lengths when returning the matched indices (#122)
# Version 2.5.0
- Added option to search by matching all tokens (in every record) when `matchAllTokens:true` (#95)
# Version 2.3.0
- Added token separator to options, when `tokenize:true` (#93)
- General code clean up (#88)
- Bunch of other bug fixes
# Version 2.2.0
- Added option to include matched indices (#6)
- Added ability to search with weighted keys (#62)
# Version 2.1.0-beta
- Added ability to search with weighted keys (#62)
# Version 2.0.0
- Modified search algorithm to search individual words AND the full string, computing the final score as a function of both. This yields better scoring accuracy (#41)
- Changed exact substrings to not have a score of zero. That is searching for "hell" in "hello" will not yield a score of zero, while searching for "hello" will (#63)
- Added `verbose` option, which will print to the console useful information, mostly for debugging
- Improved code structure.
- Added version information within Fuse itself
- Added this Changelog (#64)
- Added fallback when pattern length is greater than machine word length (i.e, > 32 characters) (#38)
- Allowed results with a value of 0 to be returned (#73)

201
node_modules/fuse.js/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2017 Kirollos Risk
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

56
node_modules/fuse.js/README.md generated vendored Normal file
View File

@@ -0,0 +1,56 @@
# Fuse.js
![Node.js CI](https://github.com/krisk/Fuse/workflows/Node.js%20CI/badge.svg)
[![Version](https://img.shields.io/npm/v/fuse.js.svg)](https://www.npmjs.com/package/fuse.js)
[![Downloads](https://img.shields.io/npm/dm/fuse.js.svg)](https://npmcharts.com/compare/fuse.js?minimal=tru)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Contributors](https://img.shields.io/github/contributors/krisk/fuse.svg)](https://github.com/krisk/Fuse/graphs/contributors)
![License](https://img.shields.io/npm/l/fuse.js.svg)
## Supporting Fuse.js
Through contributions, donations, and sponsorship, you allow Fuse.js to thrive. Also, you will be recognized as a beacon of support to open-source developers.
- [Become a backer or sponsor on **GitHub**.](https://github.com/sponsors/krisk)
- [Become a backer or sponsor on **Patreon**.](https://patreon.com/fusejs)
- [One-time donation via **PayPal**.](https://www.paypal.me/kirorisk)
---
<h3 align="center">Silver Sponsors</h3>
<!--Silver start-->
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://www.worksome.com" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/krisk/Fuse/7a0d77d85ac90063575613b6a738f418b624357f/docs/.vuepress/public/assets/img/sponsors/worksome.svg">
</a>
</td>
</tr>
</body>
</table>
<!--Silver end-->
---
## Introduction
Fuse.js is a lightweight fuzzy-search, in JavaScript, with zero dependencies.
### Browser Compatibility
Fuse.js supports all browsers that are [ES5-compliant](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
## Documentation
To check out a [live demo](https://fusejs.io/demo.html) and docs, visit [fusejs.io](https://fusejs.io).
## Develop
Here's a separate document for [developers](https://github.com/krisk/Fuse/blob/master/DEVELOPERS.md).
## Contribute
We've set up a separate document for our
[contribution guidelines](https://github.com/krisk/Fuse/blob/master/CONTRIBUTING.md).

1467
node_modules/fuse.js/dist/fuse.basic.common.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1261
node_modules/fuse.js/dist/fuse.basic.esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

9
node_modules/fuse.js/dist/fuse.basic.esm.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1473
node_modules/fuse.js/dist/fuse.basic.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

9
node_modules/fuse.js/dist/fuse.basic.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

2234
node_modules/fuse.js/dist/fuse.common.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

313
node_modules/fuse.js/dist/fuse.d.ts generated vendored Normal file
View File

@@ -0,0 +1,313 @@
// Type definitions for Fuse.js v6.6.2
// TypeScript v4.5.4
export default Fuse
export as namespace Fuse
declare class Fuse<T> {
constructor(
list: ReadonlyArray<T>,
options?: Fuse.IFuseOptions<T>,
index?: Fuse.FuseIndex<T>
)
/**
* Search function for the Fuse instance.
*
* ```typescript
* const list: MyType[] = [myType1, myType2, etc...]
* const options: Fuse.IFuseOptions<MyType> = {
* keys: ['key1', 'key2']
* }
*
* const myFuse = new Fuse(list, options)
* let result = myFuse.search('pattern')
* ```
*
* @param pattern The pattern to search
* @param options `Fuse.FuseSearchOptions`
* @returns An array of search results
*/
search<R = T>(
pattern: string | Fuse.Expression,
options?: Fuse.FuseSearchOptions
): Fuse.FuseResult<R>[]
setCollection(docs: ReadonlyArray<T>, index?: Fuse.FuseIndex<T>): void
/**
* Adds a doc to the end the list.
*/
add(doc: T): void
/**
* Removes all documents from the list which the predicate returns truthy for,
* and returns an array of the removed docs.
* The predicate is invoked with two arguments: (doc, index).
*/
remove(predicate: (doc: T, idx: number) => boolean): T[]
/**
* Removes the doc at the specified index.
*/
removeAt(idx: number): void
/**
* Returns the generated Fuse index
*/
getIndex(): Fuse.FuseIndex<T>
/**
* Return the current version.
*/
static version: string
/**
* Use this method to pre-generate the index from the list, and pass it
* directly into the Fuse instance.
*
* _Note that Fuse will automatically index the table if one isn't provided
* during instantiation._
*
* ```typescript
* const list: MyType[] = [myType1, myType2, etc...]
*
* const index = Fuse.createIndex<MyType>(
* keys: ['key1', 'key2']
* list: list
* )
*
* const options: Fuse.IFuseOptions<MyType> = {
* keys: ['key1', 'key2']
* }
*
* const myFuse = new Fuse(list, options, index)
* ```
* @param keys The keys to index
* @param list The list from which to create an index
* @param options?
* @returns An indexed list
*/
static createIndex<U>(
keys: Array<Fuse.FuseOptionKey<U>>,
list: ReadonlyArray<U>,
options?: Fuse.FuseIndexOptions<U>
): Fuse.FuseIndex<U>
static parseIndex<U>(
index: any,
options?: Fuse.FuseIndexOptions<U>
): Fuse.FuseIndex<U>
}
declare namespace Fuse {
export class FuseIndex<T> {
constructor(options?: FuseIndexOptions<T>)
setSources(docs: ReadonlyArray<T>): void
setKeys(keys: ReadonlyArray<string>): void
setIndexRecords(records: FuseIndexRecords): void
create(): void
add(doc: T): void
toJSON(): {
keys: ReadonlyArray<string>
records: FuseIndexRecords
}
}
type FuseGetFunction<T> = (
obj: T,
path: string | string[]
) => ReadonlyArray<string> | string
export type FuseIndexOptions<T> = {
getFn: FuseGetFunction<T>
}
// {
// title: { '$': "Old Man's War" },
// 'author.firstName': { '$': 'Codenar' }
// }
//
// OR
//
// {
// tags: [
// { $: 'nonfiction', idx: 0 },
// { $: 'web development', idx: 1 },
// ]
// }
export type FuseSortFunctionItem = {
[key: string]: { $: string } | { $: string; idx: number }[]
}
// {
// score: 0.001,
// key: 'author.firstName',
// value: 'Codenar',
// indices: [ [ 0, 3 ] ]
// }
export type FuseSortFunctionMatch = {
score: number
key: string
value: string
indices: ReadonlyArray<number>[]
}
// {
// score: 0,
// key: 'tags',
// value: 'nonfiction',
// idx: 1,
// indices: [ [ 0, 9 ] ]
// }
export type FuseSortFunctionMatchList = FuseSortFunctionMatch & {
idx: number
}
export type FuseSortFunctionArg = {
idx: number
item: FuseSortFunctionItem
score: number
matches?: (FuseSortFunctionMatch | FuseSortFunctionMatchList)[]
}
export type FuseSortFunction = (
a: FuseSortFunctionArg,
b: FuseSortFunctionArg
) => number
// title: {
// '$': "Old Man's War",
// 'n': 0.5773502691896258
// }
type RecordEntryObject = {
v: string // The text value
n: number // The field-length norm
}
// 'author.tags.name': [{
// 'v': 'pizza lover',
// 'i': 2,
// 'n: 0.7071067811865475
// }
type RecordEntryArrayItem = ReadonlyArray<RecordEntryObject & { i: number }>
// TODO: this makes it difficult to infer the type. Need to think more about this
type RecordEntry = { [key: string]: RecordEntryObject | RecordEntryArrayItem }
// {
// i: 0,
// '$': {
// '0': { v: "Old Man's War", n: 0.5773502691896258 },
// '1': { v: 'Codenar', n: 1 },
// '2': [
// { v: 'pizza lover', i: 2, n: 0.7071067811865475 },
// { v: 'helo wold', i: 1, n: 0.7071067811865475 },
// { v: 'hello world', i: 0, n: 0.7071067811865475 }
// ]
// }
// }
type FuseIndexObjectRecord = {
i: number // The index of the record in the source list
$: RecordEntry
}
// {
// keys: null,
// list: [
// { v: 'one', i: 0, n: 1 },
// { v: 'two', i: 1, n: 1 },
// { v: 'three', i: 2, n: 1 }
// ]
// }
type FuseIndexStringRecord = {
i: number // The index of the record in the source list
v: string // The text value
n: number // The field-length norm
}
type FuseIndexRecords =
| ReadonlyArray<FuseIndexObjectRecord>
| ReadonlyArray<FuseIndexStringRecord>
// {
// name: 'title',
// weight: 0.7
// }
export type FuseOptionKeyObject<T> = {
name: string | string[]
weight?: number
getFn?: (obj: T) => ReadonlyArray<string> | string
}
export type FuseOptionKey<T> = FuseOptionKeyObject<T> | string | string[]
export interface IFuseOptions<T> {
/** Indicates whether comparisons should be case sensitive. */
isCaseSensitive?: boolean
/** Determines how close the match must be to the fuzzy location (specified by `location`). An exact letter match which is `distance` characters away from the fuzzy location would score as a complete mismatch. A `distance` of `0` requires the match be at the exact `location` specified. A distance of `1000` would require a perfect match to be within `800` characters of the `location` to be found using a `threshold` of `0.8`. */
distance?: number
/** When true, the matching function will continue to the end of a search pattern even if a perfect match has already been located in the string. */
findAllMatches?: boolean
/** The function to use to retrieve an object's value at the provided path. The default will also search nested paths. */
getFn?: FuseGetFunction<T>
/** When `true`, search will ignore `location` and `distance`, so it won't matter where in the string the pattern appears. */
ignoreLocation?: boolean
/** When `true`, the calculation for the relevance score (used for sorting) will ignore the `field-length norm`. */
ignoreFieldNorm?: boolean
/** Determines how much the `field-length norm` affects scoring. A value of `0` is equivalent to ignoring the field-length norm. A value of `0.5` will greatly reduce the effect of field-length norm, while a value of `2.0` will greatly increase it. */
fieldNormWeight?: number
/** Whether the matches should be included in the result set. When `true`, each record in the result set will include the indices of the matched characters. These can consequently be used for highlighting purposes. */
includeMatches?: boolean
/** Whether the score should be included in the result set. A score of `0`indicates a perfect match, while a score of `1` indicates a complete mismatch. */
includeScore?: boolean
/** List of keys that will be searched. This supports nested paths, weighted search, searching in arrays of `strings` and `objects`. */
keys?: Array<FuseOptionKey<T>>
/** Determines approximately where in the text is the pattern expected to be found. */
location?: number
/** Only the matches whose length exceeds this value will be returned. (For instance, if you want to ignore single character matches in the result, set it to `2`). */
minMatchCharLength?: number
/** Whether to sort the result list, by score. */
shouldSort?: boolean
/** The function to use to sort all the results. The default will sort by ascending relevance score, ascending index. */
sortFn?: FuseSortFunction
/** At what point does the match algorithm give up. A threshold of `0.0` requires a perfect match (of both letters and location), a threshold of `1.0` would match anything. */
threshold?: number
/** When `true`, it enables the use of unix-like search commands. See [example](/examples.html#extended-search). */
useExtendedSearch?: boolean
}
// Denotes the start/end indices of a match
// start end
// ↓ ↓
type RangeTuple = [number, number]
export type FuseResultMatch = {
indices: ReadonlyArray<RangeTuple>
key?: string
refIndex?: number
value?: string
}
export type FuseSearchOptions = {
limit: number
}
export type FuseResult<T> = {
item: T
refIndex: number
score?: number
matches?: ReadonlyArray<FuseResultMatch>
}
export type Expression =
| { [key: string]: string }
| {
$path: ReadonlyArray<string>
$val: string
}
| { $and?: Expression[] }
| { $or?: Expression[] }
export const config: Required<IFuseOptions<any>>
}

1780
node_modules/fuse.js/dist/fuse.esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

9
node_modules/fuse.js/dist/fuse.esm.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

2240
node_modules/fuse.js/dist/fuse.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

9
node_modules/fuse.js/dist/fuse.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

104
node_modules/fuse.js/package.json generated vendored Normal file
View File

@@ -0,0 +1,104 @@
{
"name": "fuse.js",
"author": {
"name": "Kiro Risk",
"email": "kirollos@gmail.com",
"url": "http://kiro.me"
},
"main": "./dist/fuse.common.js",
"module": "./dist/fuse.esm.js",
"unpkg": "./dist/fuse.js",
"jsdelivr": "./dist/fuse.js",
"typings": "./dist/fuse.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"version": "6.6.2",
"description": "Lightweight fuzzy-search",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/krisk/Fuse.git"
},
"homepage": "http://fusejs.io",
"keywords": [
"fuzzy",
"search",
"bitap"
],
"scripts": {
"dev": "rollup -w -c scripts/configs.js --environment TARGET:umd-dev-full",
"dev:cjs": "rollup -w -c scripts/configs.js --environment TARGET:commonjs-full",
"dev:esm": "rollup -w -c scripts/configs.js --environment TARGET:esm-dev-full",
"build": "rm -r dist && mkdir dist && node ./scripts/build.main.js",
"test": "jest",
"lint": "eslint src scripts test",
"release": "./scripts/release.sh",
"docs:bump": "node ./scripts/bump-docs.js",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"docs:release": "./scripts/deploy-docs.sh",
"prepare": "husky install"
},
"standard-version": {
"scripts": {
"postbump": "yarn build && yarn lint && yarn test 2>/dev/null",
"precommit": "git add dist/*.js dist/*.ts"
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-object-rest-spread": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-typescript": "7.16.0",
"@commitlint/cli": "^14.1.0",
"@commitlint/config-conventional": "^14.1.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-replace": "^3.0.0",
"@types/jest": "27.0.2",
"@vuepress/plugin-google-analytics": "^1.4.0",
"@vuepress/plugin-register-components": "^1.5.2",
"babel-loader": "^8.0.5",
"codemirror": "5.63.3",
"eslint": "8.2.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-vue": "8.0.3",
"faker": "5.5.3",
"husky": "^7.0.0",
"jest": "^27.3.1",
"prettier": "2.4.1",
"replace-in-file": "^6.1.0",
"rimraf": "3.0.2",
"rollup": "^2.61.1",
"rollup-plugin-copy": "3.4.0",
"standard-version": "^9.3.2",
"terser-webpack-plugin": "5.2.5",
"typescript": "^4.4.4",
"vue-codemirror": "^4.0.6",
"vue-eslint-parser": "^8.0.1",
"vuepress": "^1.4.0",
"vuepress-plugin-element-tabs": "^0.2.8",
"vuepress-plugin-google-adsense": "^0.2.1",
"vuepress-plugin-smooth-scroll": "^0.0.10",
"vuepress-plugin-social-share": "^1.1.0",
"webpack": "4.46.0",
"webpack-cli": "^4.9.1"
},
"engines": {
"node": ">=10"
}
}