Skip to main content
Version: 2.0.3

is.camelCase

is.camelCase(target: unknown)โ€‹

Specificationโ€‹

  • Target argument: required.
  • Checks if the given "target" type is camelCase.

Informationโ€‹

  • Unit tests: โœ…

Examplesโ€‹

is.camelCase('hello'); // true
is.camelCase('hello123'); // true
is.camelCase('helloWorld'); // true
is.camelCase('a1B2c3d4e5f6g'); // true
is.camelCase('a1B2c3d4e5f6'); // true
is.camelCase('inCamelCase'); // true
is.camelCase('undefined'); // true
is.camelCase('null'); // true

is.camelCase(BigInt(1)) // false
is.camelCase(0) // false
is.camelCase(1) // false
is.camelCase(-1) // false
is.camelCase(Symbol()) // false
is.camelCase(null) // false
is.camelCase(true) // false
is.camelCase([]) // false
is.camelCase(false) // false
is.camelCase("") // false
is.camelCase('') // false
is.camelCase(``) // false
is.camelCase({}) // false
is.camelCase(undefined) // false
is.camelCase(Function) // false
is.camelCase(() => {}) // false
is.camelCase(BigInt) // false
is.camelCase(Symbol) // false
is.camelCase(NaN) // false
is.camelCase(Infinity) // false
is.camelCase(-Infinity) // false
is.camelCase(Number.POSITIVE_INFINITY) // false
is.camelCase(Number.NEGATIVE_INFINITY) // false
// And all other known types will return false

Reversal boolean resultโ€‹

is.not_camelCase('hello'); // false
is.not_camelCase('hello123'); // false
is.not_camelCase('helloWorld'); // false
is.not_camelCase('a1B2c3d4e5f6g'); // false
is.not_camelCase('a1B2c3d4e5f6'); // false
is.not_camelCase('inCamelCase'); // false
is.not_camelCase('undefined'); // false
is.not_camelCase('null'); // false

is.not_camelCase(BigInt(1)) // true
is.not_camelCase(0) // true
is.not_camelCase(1) // true
is.not_camelCase(-1) // true
is.not_camelCase(Symbol()) // true
is.not_camelCase(null) // true
is.not_camelCase(true) // true
is.not_camelCase([]) // true
is.not_camelCase(false) // true
is.not_camelCase("") // true
is.not_camelCase('') // true
is.not_camelCase(``) // true
is.not_camelCase({}) // true
is.not_camelCase(undefined) // true
is.not_camelCase(Function) // true
is.not_camelCase(() => {}) // true
is.not_camelCase(BigInt) // true
is.not_camelCase(Symbol) // true
is.not_camelCase(NaN) // true
is.not_camelCase(Infinity) // true
is.not_camelCase(-Infinity) // true
is.not_camelCase(Number.POSITIVE_INFINITY) // true
is.not_camelCase(Number.NEGATIVE_INFINITY) // true
// And all other known types will return true