Skip to content

Adds optional function "transformQuery" to manipulate the query #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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