Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async load json #262

Merged
merged 4 commits into from
May 29, 2024
Merged

Async load json #262

merged 4 commits into from
May 29, 2024

Conversation

scambier
Copy link
Contributor

@scambier scambier commented May 28, 2024

  • Added .loadJSONAsync() and .loadJSAsync() that are counterparts to their non-async version
  • Added a simple test to make sure that .loadJSONAsync() creates a MiniSearch instance that is identical to .loadJSON()
  • Replaced a few import with import type because TypeScript wasn't happy when I imported the project as a local dependency

I tried to dedupe the code as much as possible. However, the several await calls in inner loops prevent to do this cleanly without reducing code readability.

@lucaong
Copy link
Owner

lucaong commented May 28, 2024

It looks great! I will merge this tomorrow, as now it's late here and I want to give it one last look with fresh eyes.

@lucaong lucaong merged commit 4e158dd into lucaong:master May 29, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants