Skip to content

Commit

Permalink
Released 0.6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreavis committed Jan 8, 2020
1 parent 75d4d7a commit 97270b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sifter",
"keywords": ["search","filter","sift","data","results","match","sort","autocomplete"],
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.5.3",
"version": "0.6.0",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"autocomplete"
],
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.5.3",
"version": "0.6.0",
"license": "Apache-2.0",
"author": "Brian Reavis <brian@thirdroute.com>",
"main": "./sifter.js",
Expand Down
8 changes: 4 additions & 4 deletions sifter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* sifter.js
* Copyright (c) 2013 Brian Reavis & contributors
* Copyright (c) 2013–2020 Brian Reavis & contributors
*
* 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:
Expand Down Expand Up @@ -45,7 +45,7 @@
* @param {string} query
* @returns {array}
*/
Sifter.prototype.tokenize = function(query) {
Sifter.prototype.tokenize = function(query, respect_word_boundaries) {
query = trim(String(query || '').toLowerCase());
if (!query || !query.length) return [];

Expand All @@ -62,6 +62,7 @@
}
}
}
if (respect_word_boundaries) regex = "\\b"+regex
tokens.push({
string : words[i],
regex : new RegExp(regex, 'i')
Expand Down Expand Up @@ -318,7 +319,7 @@
return {
options : options,
query : String(query || '').toLowerCase(),
tokens : this.tokenize(query),
tokens : this.tokenize(query, options.respect_word_boundaries),
total : 0,
items : []
};
Expand Down Expand Up @@ -495,4 +496,3 @@

return Sifter;
}));

2 changes: 1 addition & 1 deletion sifter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97270b4

Please sign in to comment.