Utility functions for every project
npm i @codegolia/utils
import { isNumber } from '@codegolia/utils';
// or
import { isNumber } from '@codegolia/utils/isNumber';
console.log(isNumber(123)); // true
console.log(isNumber('123')); // false
- Infinity
- NaN
- Null
- Undefined
- GlobalThis
- Object
- Function
- Boolean
- Symbol
- Error
- AggregateError
- EvalError
- InternalError
- RangeError
- ReferenceError
- SyntaxError
- TypeError
- URIError
- Number
- BigInt
- Math
- Date
- String
- RegExp
- Array
- Int8Array
- Uint8Array
- Uint8ClampedArray
- Int16Array
- Uint16Array
- Int32Array
- Uint32Array
- Float32Array
- Float64Array
- BigInt64Array
- BigUint64Array
- Map
- Set
- WeakMap
- WeakSet
- ArrayBuffer
- SharedArrayBuffer
- Atomics
- DataView
- Promise
- Generator
- GeneratorFunction
- AsyncFunction (x)
- AsyncGenerator
- AsyncGeneratorFunction
- Reflect (x)
- Proxy
- Intl (x)
- WebAssembly (x)
- IsEmail
- IsMaxLength
- IsMinLength
- IsEqualLength
- IsEmptyString
- IsLowerCase
- IsUpperCase
- IsPascalCase
- IsCamelCase
- IsKebabCase
- IsSnakeCase
- ToCamelCase
- ToKebabCase
- ToLowerCase
- ToPascalCase
- ToSnakeCase
- ToUpperCase
- IsBit
- IsInt
- IsInt1
- IsInt2
- IsInt3
- IsInt4
- IsInt8
- IsUint
- IsUint1
- IsUint2
- IsUint3
- IsUint4
- IsUint8
- IsFloat
- IsPercent
- IsDecimal
- IsEven
- IsOdd
- IsMin
- IsMax
- IsNegative
- IsPositive
- IsEmptyNumber
- IsBetween
- GetPrecision
- IsTrue
- IsFalse
- IsTruthy
- IsFalsy
- IsKeyExist
- IsEmptyObject
- IndexToProperty
- GetKey
- GetObjectType
- SetKey
- IsTypedArray
- IsEmptyArray
- IsMaxLength
- IsMinLength
- IsEqualLength
- IsContains
- IsDefined
- IsEqual
- IsNullish
- IsEmpty