Skip to content

Conversation

bambax
Copy link

@bambax bambax commented Apr 1, 2014

transformQuery is an optional function that is run in getQuery and does nothing by default. It's useful for example to "slugify" the query so that accents are removed before the query is analyzed for matches, etc. (See underscore-string for an example of a slugify function).

bambax added 2 commits April 1, 2014 19:44
The function "transformQuery" lets one do some operations on the query before it's analyzed by the script; the default is to do nothing and pass the query unchanged. Useful for example to "slugify" the query so that "métro" becomes "metro" for example. (slugify: cf. underscore-string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant