Skip to content

Commit 1e878ba

Browse files
committed
Release v0.0.8
Use the correct unpkg.com CDN URL in the readme. Highlight needing to access the methods through a global when loading the library via a `<script>` tag. Fix one of the example scores. Fix #6.
1 parent 750e043 commit 1e878ba

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.0.8] - 2020-05-07
4+
5+
### Fixed
6+
7+
- Use the correct unpkg.com CDN URL in the readme.
8+
- Highlight needing to access the methods through a global when loading the library via a `<script>` tag.
9+
10+
311
## [0.0.7] - 2020-05-03
412

513
### Added

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@ npm install --save quick-score
2727

2828
If you prefer to use the built library files directly instead of using `npm`, you can download them from [https://unpkg.com/browse/quick-score/dist/](https://unpkg.com/browse/quick-score/dist/).
2929

30-
Or you can load a particular release of the minified script directly from unpkg:
30+
Or you can load a particular release of the minified script directly from `unpkg.com`, and then access the library via the `quickScore` global:
3131

3232
```html
33-
<script src="https://unpkg.com/browse/quick-score@0.0.6/dist/quick-score.min.js"></script>
33+
<script src="https://unpkg.com/quick-score@0.0.7/dist/quick-score.min.js"></script>
3434
<script type="text/javascript">
35-
const qs = new quickScore.QuickScore(...);
36-
const results = qs.search("test");
35+
console.log(quickScore.quickScore("thought", "gh"));
3736
</script>
3837
```
3938

@@ -57,8 +56,9 @@ const quickScore = require("quick-score").quickScore;
5756
You can then call `quickScore()` with a `string` and a `query` to score against that string. It will return a floating point score between `0` and `1`. A higher score means that string is a better match for the query. A `1` means the query is the highest match for the string, though the two strings may still differ in case and whitespace characters.
5857

5958
```js
60-
quickScore("thought", "gh"); // 0.7000000000000001
59+
quickScore("thought", "gh"); // 0.4142857142857143
6160
quickScore("GitHub", "gh"); // 0.9166666666666666
61+
6262
```
6363

6464
Matching `gh` against `GitHub` returns a higher score than `thought`, because it matches the capital letters in `GitHub`, which are weighted more highly.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quick-score",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "A JavaScript string-scoring and fuzzy-matching library based on the Quicksilver algorithm, designed for smart auto-complete.",
55
"keywords": [
66
"string",

0 commit comments

Comments
 (0)