Adding is.base64 and is.hex

I needed these for a project I'm working on.  Hope you find them useful.
You could ask a similar question: is 'Fred' base64 encoded?  I'd say in
both cases the answer is yes.  Such strings can have multiple valid
interpretations.  It all depends on what you need at the moment.  I'd keep
it "is a valid" but will defer to you.

The empty string is an interesting question.  For what it's worth, new
Buffer('', 'hex') is valid and returns a zero length buffer.  I could go
either way on this.

On Mon, Oct 20, 2014 at 4:33 PM, Jordan Harband <notifications@github.com>
wrote:

> In index.js:
>
> > +};
> > +
> > +/**
> > + * Test base64 string.
> > + */
> > +
> > +/**
> > + * is.hex
> > + * Test if `value` is a valid hex encoded string.
> > + *
> > + * @param {Mixed} value value to test
> > + * @return {Boolean} true if 'value' is a hex encoded string, false otherwise
> > + * @api public
> > + */
> > +
> > +is.hex = function (value) {
>
> Hmm. Is '16' hex encoded? It might or might not be. Perhaps the
> description of this method should change "is a valid" to "might be a
> valid"? In that case, should '' return true?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/enricomarino/is/pull/12/files#r19111473>.
>



-- 
*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).