Skip to content

Commit

Permalink
normalize-for-search -> slug
Browse files Browse the repository at this point in the history
because of Unicode chars
  • Loading branch information
derhuerst committed Jul 3, 2017
1 parent c6d33df commit bcbc03d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -12,7 +12,7 @@
"license": "ISC",
"engines": {"node": ">=4"},
"dependencies": {
"normalize-for-search": "^2.0.1"
"slug": "^0.9.1"
},
"devDependencies": {
"so": "^1.0.1",
Expand Down
3 changes: 2 additions & 1 deletion tokenize.js
@@ -1,12 +1,13 @@
'use strict'

const normalize = require('normalize-for-search')
const normalize = require('slug')

const delim = /[\s\/\(\)\-,\.\+]+/

// todo: see derhuerst/vbb-tokenize-station
const tokenize = (name) =>
normalize(name)
.toLowerCase()
.split(delim)
.map((part) => part.trim())
.filter((part) => part.length > 0)
Expand Down

0 comments on commit bcbc03d

Please sign in to comment.