diff options
| author | Stephen Blott | 2015-05-02 17:32:28 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-05-03 08:41:55 +0100 | 
| commit | ba4e8018e3d8cd80e0fa9ac541e37e7eee37028f (patch) | |
| tree | dda565cc9f2d55009329d81405490d467764680b /lib | |
| parent | 8329f3cbe95e6a39e500aa15e54c6c44fad9cb7e (diff) | |
| download | vimium-ba4e8018e3d8cd80e0fa9ac541e37e7eee37028f.tar.bz2 | |
Search completion; tweaks and refactoring.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.coffee | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/lib/utils.coffee b/lib/utils.coffee index 88fe9e2c..5d9696e1 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -177,6 +177,13 @@ Utils =      delete obj[property] for property in properties      obj +  # Does string match any of these regexps? +  matchesAnyRegexp: (regexps, string) -> +    for re in regexps +      return true if re.test string +    false + +  # This creates a new function out of an existing function, where the new function takes fewer arguments. This  # allows us to pass around functions instead of functions + a partial list of arguments.  Function::curry = -> | 
