3.0.5 • Published 6 years ago

@helpdotcom/is v3.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

is

isDate, isUUID, and isEmail for use with help-gen

Install

$ npm install --save @helpdotcom/is

Test

$ npm test

Usage

'use strict'

const is = require('@helpdotcom/is')

isDate(d)

Returns true if d is a valid ISO date string. Otherwise, returns false.

isEmail(s)

Returns true if s is a valid email address. Otherwise, returns false.

isEmailAllowName(s)

Returns true if s is a valid email address with an optional name. Otherwise, returns false.

The following formats are supported:

  • evan.lucas@help.com
  • Evan Lucas <evan.lucas@help.com>
  • "Evan Lucas" <evan.lucas@help.com>
  • "Help.com, LLC" <info@help.com>
  • Help.com, LLC <info@help.com>
  • Jane Doe (maiden name) <jane@doe.com>

isUUID(s)

Returns true if s is a valid v4 UUID. Otherwise, returns false.

isUrl(s)

Returns true if s is a valid URL. Otherwise, returns false.

isIpAllowCIDR(s)

Returns true if s is a valid ip with CIDR notation. Otherwise, returns false.

Author

Evan Lucas

License

MIT (See LICENSE for more info)

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago