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

style: format code with Prettier #17

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export function weightedAverage(values: number[], weights?: number[]): number {
if (weights && values.length !== weights.length) {
throw new Error(
"The number of values must be equal to the number of weights"
"The number of values must be equal to the number of weights",
);
}

Expand Down
4 changes: 2 additions & 2 deletions test/pico.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("splitWordsAndRank", () => {
const result = picoSearch(
[{ name: shouldNotWork }, { name: shouldWork }],
searchTerm,
["name"]
["name"],
);

const names = result.map((r) => r.name);
Expand Down Expand Up @@ -85,7 +85,7 @@ describe("picoSearch: jaroWinkler [default]", () => {
expect(
picoSearch(objects, "ohn", ["name"], {
threshold: 0.7,
})
}),
).toMatchObject([
{ age: 25, city: "New York", name: "John Doe" },
{ age: 85, city: "Seattle", name: "John Smith" },
Expand Down