Add detect.isBreakpoint method

Instead of doing something like this

```
/desktop|wide/.test(detect.getBreakpoint());
```

can now do this

```
detect.isBreakpoint({ min: 'desktop' });
```

Another step towards allowing us to add tweakpoints/new breakpoints to our detect object
`breakpoints` can be an associative array by `name` :)


On 4 September 2014 17:31, Darren Hurley <notifications@github.com> wrote:

> In common/app/assets/javascripts/utils/detect.js:
>
> > @@ -230,6 +238,26 @@ define([
> >          return breakpoint;
> >      }
> >
> > +    function isBreakpoint(criteria) {
> > +        var c = defaults(
> > +                criteria,
> > +                {
> > +                    min: first(breakpoints).name,
> > +                    max: last(breakpoints).name
> > +                }
> > +            ),
> > +            currentBreakpoint = getBreakpoint(true);
> > +        return _(breakpoints)
>
> yes, except breakpoints is an array of objects, so you need to loop
> through it to find where breakpoint.name == c.min, and you back to
> iterating
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/guardian/frontend/pull/5839/files#r17125301>.
>

-- 

------------------------------
Visit theguardian.com. On your mobile and tablet, download the Guardian 
iPhone and Android apps theguardian.com/guardianapp and our tablet editions 
theguardian.com/editions.  Save up to 57% by subscribing to the Guardian 
and Observer - choose the papers you want and get full digital access. 
 Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also be 
privileged. If you are not the named recipient, please notify the sender 
and delete the e-mail and all attachments immediately. Do not disclose the 
contents to another person. You may not use the information for any 
purpose, or store, or copy, it in any way.  Guardian News & Media Limited 
is not liable for any computer viruses or other material transmitted with 
or as part of this e-mail. You should employ virus checking software.
 
Guardian News & Media Limited is a member of Guardian Media Group plc. Registered 
Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP.  Registered 
in England Number 908396