Adding is.base64 and is.hex

I needed these for a project I'm working on.  Hope you find them useful.
Maybe a separate is.color(value) is needed to support this use case?

On Mon, Oct 20, 2014 at 12:15 PM, Peter Girard <pgirard@appgeo.com> wrote:

> True.  However in Node:
>
> var x = new Buffer('abc', 'hex');
>
> throws
>
> TypeError: Invalid hex string
>
> which is what this test is meant to avoid.
>
> On Mon, Oct 20, 2014 at 11:38 AM, Jordan Harband <notifications@github.com
> > wrote:
>
>> In index.js:
>>
>> > @@ -20,6 +20,9 @@ var NON_HOST_TYPES = {
>> >    undefined: 1
>> >  };
>> >
>> > +var base64Regex = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;
>> > +var hexRegex = /^([A-Fa-f0-9]{2})+$/;
>>
>> Since hex strings are most commonly used in JS as CSS color values, and
>> values 2, 3, and 6 characters long are common, I'd say we should support
>> that.
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/enricomarino/is/pull/12/files#r19092516>.
>>
>
>
>
> --
> *Peter Girard*
> *Vice President*
> 617-447-2424 Direct | 617-447-2400 Main
> Applied Geographics, Inc.
> 24 School Street, Suite 500
> Boston, MA 02108
> www.AppGeo.com
>
>



-- 
*Peter Girard*
*Vice President*
617-447-2424 Direct | 617-447-2400 Main
Applied Geographics, Inc.
24 School Street, Suite 500
Boston, MA 02108
www.AppGeo.com

-- 
This e-mail message and any attachments may contain confidential or legally 
privileged information. If you are not an intended recipient or otherwise 
authorized to receive this message, you should not use, copy, distribute, 
disclose or take any action based on the information contained in this 
e-mail or any attachments. If you have received this message and material 
in error, please advise the sender immediately by reply e-mail and delete 
this message. Thank you on behalf of Applied Geographics, Inc. (AppGeo).