Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created May 21, 2014 09:12
Show Gist options
  • Save rightfold/08464655df178b0fc82c to your computer and use it in GitHub Desktop.
Save rightfold/08464655df178b0fc82c to your computer and use it in GitHub Desktop.
filter-function = ->
fs = []
fs.push <| mss.query-filter(dialog.find('.node-selector-search').val!)
fs.push <| (.is-orphan) if dialog.find('.orphan-pages').is(':checked')
fs.push <| (x) -> any (<| x), [
(.languages) >> empty
(.languages) >> (`intersection` languages) >> empty >> (not)
]
(x) -> all (<| x), fs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment