Checks if a value is in an array.
import { inArray } from '@jonibach/check'
const result = inArray(3,1,2,3,4,5)
params:
value
array
async: no
Demo not found
Checks if a value is in an array.
import { inArray } from '@jonibach/check'
const result = inArray(3,1,2,3,4,5)
params:
value
array
async: no
Demo not found
Checks if a value is not in an array.
import { notInArray } from '@jonibach/check'
const result = notInArray(6,1,2,3,4,5)
params:
value
array
async: no
Demo not found
Checks if an array is empty.
import { empty } from '@jonibach/check'
const result = empty(,)
params:
array
async: no
Demo not found
Checks if an array is not empty.
import { notEmpty } from '@jonibach/check'
const result = notEmpty(1,2,)
params:
array
async: no
Demo not found
Checks if two values are equal.
import { isEqualTo } from '@jonibach/check'
const result = isEqualTo(5,5)
params:
a
b
async: no
Demo not found
Checks if two values are not equal.
import { isNotEqualTo } from '@jonibach/check'
const result = isNotEqualTo(5,10)
params:
a
b
async: no
Demo not found
Checks if a value is greater than another value.
import { isGreaterThan } from '@jonibach/check'
const result = isGreaterThan(10,5)
params:
a
b
async: no
Demo not found
Checks if a value is less than another value.
import { isLessThan } from '@jonibach/check'
const result = isLessThan(5,10)
params:
a
b
async: no
Demo not found
Checks if a value is greater than or equal to another value.
import { isGreaterThanOrEqualTo } from '@jonibach/check'
const result = isGreaterThanOrEqualTo(10,10)
params:
a
b
async: no
Demo not found
Checks if a value is less than or equal to another value.
import { isLessThanOrEqualTo } from '@jonibach/check'
const result = isLessThanOrEqualTo(5,5)
params:
a
b
async: no
Demo not found
Checks if two values are strictly equal.
import { isStrictlyEqualTo } from '@jonibach/check'
const result = isStrictlyEqualTo(5,5)
params:
a
b
async: no
Demo not found
Checks if two values are strictly not equal.
import { isStrictlyNotEqualTo } from '@jonibach/check'
const result = isStrictlyNotEqualTo(5,5)
params:
a
b
async: no
Demo not found
Checks if a string starts with another string.
import { startsWith } from '@jonibach/check'
const result = startsWith(Hello!,Hel)
params:
str
substring
async: no
Demo not found
Checks if a string ends with another string.
import { endsWith } from '@jonibach/check'
const result = endsWith(Hello!,world!)
params:
str
substring
async: no
Demo not found
Checks if a string contains another string.
import { contains } from '@jonibach/check'
const result = contains(Hello!,lo, wo)
params:
str
substring
async: no
Demo not found
Checks if a string matches a regular expression.
import { matches } from '@jonibach/check'
const result = matches(Hello!,/world!$/)
params:
str
regex
async: no
Demo not found
Checks if a string matches a regular expression.
import { regex } from '@jonibach/check'
const result = regex(Hello!,/world!$/)
params:
str
regex
async: no
Demo not found
Checks if a string has a specific length.
import { lengthEquals } from '@jonibach/check'
const result = lengthEquals(Hello,5)
params:
str
length
async: no
Demo not found
Checks if a string has a length greater than a specific value.
import { lengthGreaterThan } from '@jonibach/check'
const result = lengthGreaterThan(Hello!,5)
params:
str
length
async: no
Demo not found
Checks if a string has a length less than a specific value.
import { lengthLessThan } from '@jonibach/check'
const result = lengthLessThan(Hi,5)
params:
str
length
async: no
Demo not found
Checks if a string is a valid URL.
import { validURL } from '@jonibach/check'
const result = validURL(https://www.example,)
params:
str
async: no
Demo not found
Checks if a string is a valid email address.
import { validEmail } from '@jonibach/check'
const result = validEmail(email@example,)
params:
async: no
Demo not found
Checks if a string is a valid domain.
import { domainMatches } from '@jonibach/check'
const result = domainMatches(https://www.example,www.example.com)
params:
url
domain
async: no
Demo not found
Checks if all values are true.
import { and } from '@jonibach/check'
const result = and(true,true)
params:
...conditions
async: no
Demo not found
Checks if any value is true.
import { or } from '@jonibach/check'
const result = or(false,false)
params:
...conditions
async: no
Demo not found
Checks if a value is false.
import { not } from '@jonibach/check'
const result = not(false,)
params:
condition
async: no
Demo not found
Checks if exactly one value is true.
import { xor } from '@jonibach/check'
const result = xor(true,false)
params:
condition1
condition2
async: no
Demo not found
Checks if neither value is true.
import { nand } from '@jonibach/check'
const result = nand(true,true)
params:
condition1
condition2
async: no
Demo not found
Checks if neither value is true.
import { nor } from '@jonibach/check'
const result = nor(false,false)
params:
condition1
condition2
async: no
Demo not found
Checks if a number is even.
import { even } from '@jonibach/check'
const result = even(4)
params:
number
async: no
Demo not found
Checks if a number is odd.
import { odd } from '@jonibach/check'
const result = odd(5)
params:
number
async: no
Demo not found
Checks if a number is divisible by another number.
import { divisibleBy } from '@jonibach/check'
const result = divisibleBy(10,2)
params:
number
divisor
async: no
Demo not found
Checks if a value exists.
import { exists } from '@jonibach/check'
const result = exists()
params:
value
async: no
Demo not found
Checks if a value does not exist.
import { doesNotExist } from '@jonibach/check'
const result = doesNotExist()
params:
value
async: no
Demo not found
Checks if a date is before another date.
import { before } from '@jonibach/check'
const result = before(Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time),Thu Jan 02 2020 00:00:00 GMT+0000 (Coordinated Universal Time))
params:
date1
date2
async: no
Demo not found
Checks if a date is after another date.
import { after } from '@jonibach/check'
const result = after(Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time),Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time))
params:
date1
date2
async: no
Demo not found
Checks if a date is between two dates.
import { betweenDates } from '@jonibach/check'
const result = betweenDates(Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time),Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time),Fri Jan 03 2020 00:00:00 GMT+0000 (Coordinated Universal Time))
params:
date
startDate
endDate
async: no
Demo not found
Checks if two dates are on the same day.
import { sameDay } from '@jonibach/check'
const result = sameDay(Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time),Wed Jan 01 2020 00:00:00 GMT+0000 (Coordinated Universal Time))
params:
date1
date2
async: no
Demo not found
Checks if a key exists in an object.
import { keyExists } from '@jonibach/check'
const result = keyExists([object Object],hello)
params:
obj
key
async: no
Demo not found
Checks if a key does not exist in an object.
import { keyDoesNotExist } from '@jonibach/check'
const result = keyDoesNotExist([object Object],world)
params:
obj
key
async: no
Demo not found
Checks if a value is of a specific type.
import { checkType } from '@jonibach/check'
const result = checkType(Hello,string)
params:
value
type
async: no
Demo not found