Skip to content

Commit

Permalink
fix: remove unused import from index generation
Browse files Browse the repository at this point in the history
  • Loading branch information
krisk committed Jun 23, 2020
1 parent dfa4823 commit af7794e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions dist/fuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,7 @@
var myIndex = new FuseIndex({
getFn: getFn
});
myIndex.setKeys(keys.map(function (key) {
return createKey(key);
}));
myIndex.setKeys(keys.map(createKey));
myIndex.setSources(docs);
myIndex.create();
return myIndex;
Expand Down
4 changes: 2 additions & 2 deletions src/tools/FuseIndex.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isArray, isDefined, isString, isBlank } from '../helpers/types'
import Config from '../core/config'
import normGenerator from './norm'
import KeyStore, { createKey } from './KeyStore'
import { createKey } from './KeyStore'

export default class FuseIndex {
constructor({ getFn = Config.getFn } = {}) {
Expand Down Expand Up @@ -149,7 +149,7 @@ export default class FuseIndex {

export function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
const myIndex = new FuseIndex({ getFn })
myIndex.setKeys(keys.map((key) => createKey(key)))
myIndex.setKeys(keys.map(createKey))
myIndex.setSources(docs)
myIndex.create()
return myIndex
Expand Down

0 comments on commit af7794e

Please sign in to comment.