is-this-correct

0.0.8 • Public • Published

is-this-correct

Build Status

this-is-correct library is a light package of useful validation functions

is this a mail adress?
const {email} = require('is-this-correct')
email('testmail@mymailservices.com') // true
email('testmail@mymailservices.com.tr') // true
email('@mymailservices.com') // false
email('test@mymailservices') // false
is this least 6 character?
const {least6Char} = require('is-this-correct')
least6Char('123456') // true
least6Char('1234') // false
least6Char(123456) // true
least6Char(12345) // false
is this a function?
const {isFunction} = require('is-this-correct')
let testFnc = function () { }
isFunction(testFnc) // true
is this an empty string?
const {isStringEmpty} = require('is-this-correct')
let emptyString = ""
isStringEmpty(emptyString) // true
 
let str = "notempty"
isStringEmpty(str) // false
is this a number?
const {isNumber} = require('is-this-correct')
let nmr = 1
isNumber(nmr) // true
let str = "ds"
isNumber(str) // false

Package Sidebar

Install

npm i is-this-correct

Weekly Downloads

1

Version

0.0.8

License

MIT

Last publish

Collaborators

  • selimabidin