File: fuzzy.coffee

Defined in: theme/default/src/coffee

Method Summary

Method Details

? window.fuzzy(pattern, items, options = {})

Filter a list of items.

Note: If pre is passed, you also have to pass post (and vice-versa).

Examples:

Parameters:

  • patternThe fuzzy String to match against.
  • itemsAn Array of String.
  • options(optional)
    • pre - String to insert before matching text.
    • post - String to insert after matching text.
    • limit - Integer maximum number of results.
    • separator - String separator. Match against the last
    section of the String by default.
  • * ignorecaseBoolean (default: true).
    • ignorespace - Boolean (default: true).
    • separate - Boolean (default: false). If set to true, the
    function returns an array of an array of strings, where each array is [beforeLastSeparator, afterLastSeparator]. If set, separator must also be passed.