Checks if first string ends with the second string.
endsWith("ban qux", "qux")→ trueChecks if object is defined.
exists({})→ trueChecks if the string has an audio file extension.
hasAudioExtension("foo.mp3")→ trueChecks if the array contains duplicate values.
hasDuplicates(["foo", "foo"])→ trueChecks if the string has given extension.
hasExtension("foo.txt", "txt")→ trueChecks if the passed object has any key.
hasKeys({ foo: "bar" })→ trueChecks if the length of value is equal the number.
hasLengthOf([1, 2], 2)→ trueChecks if the length of value is greater or equal the number.
hasLengthOfAtLeast([1, 2], 2)→ truehasLengthOfAtLeast([1, 2, 3], 2)→ trueChecks if the length of value is smaller or equal the number.
hasLengthOfAtMost([1, 2, 3, 4, 5], 10)→ truehasLengthOfAtMost([1, 2, 3], 2)→ falseChecks if the value contains the new line char.
hasNewLine("foo
bar")→ trueChecks if the value contains at least one number.
hasNumber([1, 2])→ truehasNumber({ foo: 1, bar: "baz" })→ trueChecks if the value contains more than one number.
hasNumbers([1, 2])→ truehasNumbers({ foo: 1, bar: "baz", ban: 2 })→ trueChecks the type of passed value.
hasTypeOf(32, "number")→ trueChecks if the string has a video file extension.
hasVideoExtension("foo.mkv")→ trueChecks if the string contains whitespaces.
hasWhitespace("foo bar")→ truehasWhitespace("foo bar")→ trueChecks if the string contains particular number of words.
hasWords("foo bar baz", 3)→ truehasWords(myVariable)→ trueChecks if the length of value is equal the number.
have([1, 2, 3, 4, 5], 5)→ trueChecks if the length of value is smaller than the number.
haveLessThan([1, 2, 3], 10)→ trueChecks if the array have more than one element.
haveMany([1, 2])→ trueChecks if the length of value is greater than number.
haveMoreThan([1, 2, 3, 4, 5], 4)→ trueChecks if first value includes second value.
includes("lorem ipsum", "lorem")→ trueChecks if the string contains only letters.
isAlpha("foo")→ trueisAlpha("foo123")→ falseChecks if the string contains only letters and numbers.
isAlphaNumeric("foo")→ trueisAlphaNumeric("foo123")→ trueReturns true when one value from passed values is truthy.
isAlternative(0, 1)→ trueisAlternative(1, 1)→ trueChecks if the value is an array.
isArray([])→ trueChecks if first is between second and third number.
isBetween(10, 5, 20)→ trueReturns boolean value of bitwise alternative.
isBitwiseAlternative(1, 0)→ trueisBitwiseAlternative(1, 1)→ trueReturns boolean value of bitwise alternative negation.
isBitwiseAlternativeNegation(1, 0)→ trueisBitwiseAlternativeNegation(0, 1)→ trueReturns boolean value of bitwise conjunction.
isBitwiseConjunction(1, 1)→ trueReturns boolean value of bitwise negation.
isBitwiseNegation(0)→ trueChecks if the value is an boolean.
isBoolean(true)→ trueisBoolean(1)→ falseReturns true when both values from passed values are truthy.
isConjunction(1, 1)→ trueChecks if the value is an date.
isDate(new Date())→ trueChecks if the value is an decimal.
isDecimal(2.5)→ trueChecks if the value is defined (different than undefined).
isDefined({ foo: "bar" })→ trueisDefined(null)→ trueisDefined(undefined)→ falseChecks if the value is an digit.
isDigit(2)→ trueisDigit("2")→ trueChecks if one number is divisible by second number.
isDivisible(10, 5)→ trueChecks if the string is an email.
isEmail("foobar@gmail.com")→ trueChecks if the value is empty.
isEmpty([])→ trueisEmpty({})→ trueChecks if the array is empty.
isEmptyArray([])→ trueChecks if the object is empty.
isEmptyObject({})→ trueChecks if the set is empty.
isEmptySet(new Set([]))→ trueChecks if values are equal.
isEqual("foo", "foo")→ trueisEqual([1, 3, 2], [1, 2, 3])→ trueisEqual([1, 2, 3], [1, 2, 3])→ trueisEqual([1, 3, 2], [1, 2, 3], true)→ falseisEqual([1, 2, 3], [1, 2, 3], true)→ trueChecks if passed object is an error object.
isError(new Error("ValidationError"))→ trueChecks if the number is even.
isEven(2)→ trueReturns true when one value from passed values is truthy and second is falsy.
isExclusiveAlternative(1, 0)→ trueisExclusiveAlternative(0, 1)→ trueDetermines if an object can be extend by new properties.
isExtensible({})→ trueChecks if passed value is an falsy value.
isFalsy(false)→ trueisFalsy(null)→ trueChecks if the number is finite.
isFinite(100)→ trueChecks if tje object is frozen (cannot add, remove, change object properties).
isFrozen(Object.freeze({}))→ trueChecks if passed value is a function.
isFunction(function () {})→ trueChecks if first number is greater than second.
isGreaterThan(10, 5)→ trueChecks if first value is greater or equal second value.
isGreaterThanOrEqual(42, 42)→ trueChecks if the string is a name of image file.
isImage("foo.jpg")→ trueChecks if the first value includes second value.
isIn(5, [5, 10, 15])→ trueisIn("5", "12345")→ trueChecks if the number is infinite.
isInfinite(Infinity)→ trueChecks if the prototype property of a constructor exists in the prototype chain of an object.
isInstanceOf(["foo", "bar"], Array)→ trueChecks if one date is later than second date.
isLaterThan(new Date(2018, 4, 11), new Date(2018, 4, 1))→ trueChecks if first number is smaller than second.
isLessThan(2, 5)→ trueChecks if first number is smaller or equal second.
isLessThanOrEqual(3,5)→ trueChecks if the value is a map.
isMap(new Map([ ["foo", "bar"] ]))→ trueChecks if object is undefined.
isMissing(null)→ trueChecks if one number is multiple of second number.
isMultiple(200, 100)→ trueChecks if passed value is NaN and the type of value is Number.
isNaN(NaN)→ trueChecks if the number is negative.
isNegative(-100)→ trueChecks if the value is null.
isNull(null)→ trueisNull(0)→ falseChecks if the value is an number.
isNumber(2)→ trueChecks if the value is an numeric (a number or string that could be converted to number).
isNumeric(2)→ trueisNumeric("2")→ trueChecks if the value is an object.
isObject({})→ trueisObject(function () {})→ trueChecks if the number is odd.
isOdd(1)→ trueChecks if the value is palindrome.
isPalindrome("devil lived")→ trueChecks if the string is a valid phone number.
isPhone("+48 123 345 67")→ trueChecks if passed value is an object.
isPlainObject({})→ trueisPlainObject([])→ falseChecks if the number is positive.
isPositive(100)→ trueChecks if the value is present (different than undefined).
isPresent({ foo: "bar" })→ trueisPresent(null)→ trueChecks if the number is prime.
isPrime(13)→ trueChecks if the value is an regural expression.
isRegExp(/foo/)→ trueChecks if the object is frozen (cannot add and remove object properties).
isSealed(Object.seal({}))→ trueChecks if the value is an set.
isSet(new Set())→ trueChecks if one date is sooner than second date.
isSoonerThan(new Date(2018, 4, 1), new Date(2018, 4, 11))→ trueChecks if the value is an string.
isString("foo")→ trueChecks if the value is an symbol.
isSymbol(Symbol("foo"))→ trueChecks if passed value is an truthy value.
isTruthy({})→ trueisTruthy([])→ trueChecks if the value is undefined.
isUndefined(undefined)→ trueChecks if the string is an url.
isUrl("https://buxlabs.pl/narzędzia/js")→ trueChecks if the value is an weakmap.
isWeakMap(new WeakMap())→ trueChecks if the value is an weakset.
isWeakSet(new WeakSet())→ trueChecks if string matches passed regExp.
matches("lorem ipsum", /ipsum/)→ trueChecks if values are different.
notEqual("foo", "bar")→ trueChecks if object has function with the name given in string.
respondsTo({ foo: function () {} }, "foo")→ trueChecks if first string starts with the second string.
startsWith("ban qux", "ban")→ true