umt
v4.0.0
Published
UMT Main Package is written in TypeScript and is a collection of useful functions for various tasks.
Maintainers
Readme
UMT Main Package
UMT Main Package is written in TypeScript and is a collection of useful functions for various tasks.
Install
npm install umt
# or
yarn add umt
# or
pnpm add umt
# or
bun add umtFunction List
Advance
Array
- arraysJoin
- binarySearch
- checkFlagAlignment
- chunk
- compact
- drop
- dualPivotQuickSort
- first
- generateNumberArray
- getArraysCommon
- getArraysDiff
- groupBy
- insertionSort
- mergeSort
- pop
- quickSort
- randomSelect
- range
- shuffle
- shuffle2DArray
- sum
- timSort
- ultraNumberSort
- uniqBy
- unique
- zip
- zipLongest
Async
- debounceAsync
- DebouncedAsyncFunction
- defer
- Deferred
- parallel
- pSettled
- retry
- RetryOptions
- SettledResult
- sleep
- throttleAsync
- ThrottledAsyncFunction
- timeout
- waitFor
- WaitForOptions
Color
Consts
- HttpClientErrorStatus
- HttpInformationalStatus
- HttpRedirectionStatus
- HttpServerErrorStatus
- HttpStatus
- HttpSuccessStatus
- OneDayMs
- OneHourMs
- OneMinuteMs
- OneMonthMs
- OneMonthMs28
- OneMonthMs29
- OneMonthMs31
- OneSecondMs
- OneWeekMs
- OneYearMs
- OneYearMs366
Crypto
DataStructure
Date
- addDuration
- birthday
- DateBoundaryUnit
- dateRange
- DayList
- dayOfWeek
- diff
- DurationUnit
- endOf
- format
- formatRelative
- getDay
- getTimezoneOffsetString
- isBusinessDay
- isLeapYear
- isSameDay
- isWeekend
- newDateInt
- newDateString
- now
- startOf
- subDuration
Decorator
- addFieldRule
- collectRules
- FieldMeta
- FieldRule
- getFieldMeta
- IsArray
- IsBoolean
- IsNumber
- IsString
- LengthBetween
- markNullable
- markOptional
- Max
- Min
- Nullable
- Optional
- Schema
- storage
- Validatable
- validateField
- validateInstance
- ValidationIssue
Error
Function
- curry
- debounce
- DebouncedFunction
- DebounceOptions
- memoize
- MemoizedFunction
- MemoizeOptions
- once
- throttle
- ThrottledFunction
IP
- cidrToLong
- cidrToSubnetMask
- getIpClass
- getNetworkAddress
- ipToBinaryString
- ipToLong
- isInRange
- isPrivateIp
- longToIp
- subnetMaskToCidr
Iterator
Map
Math
- addition
- average
- bitwise
- calculator
- calculatorCore
- calculatorInitialization
- clamp
- convertCurrency
- correlationCoefficient
- degToRad
- deviationValue
- division
- factorial
- factorize
- flexibleNumberConversion
- gcd
- getDecimalLength
- inRange
- lcm
- linearCongruentialGenerator
- literalExpression
- mathConverter
- mathSeparator
- max
- median
- min
- mode
- multiples
- multiplication
- nCr
- nHr
- nPr
- percentile
- primeFactorization
- quotient
- radToDeg
- random
- reduce
- repeatedTrial
- roundOf
- solveEquation
- standardDeviation
- subtract
- sumPrecise
- toBaseN
- toCelsius
- toKelvin
- uuidv7
- valueSwap
- xoshiro256
Number
Object
- deepClone
- flattenObject
- get
- getObjectsCommon
- getObjectsDiff
- has
- invert
- isEmpty
- isPlainObject
- Iteratee
- IterateeFunction
- keyBy
- mapKeys
- mapValues
- merge
- mergeDeep
- omit
- omitBy
- pathSegments
- pick
- pickBy
- pickDeep
- PropertyName
- removePrototype
- removePrototypeDeep
- removePrototypeMap
- removePrototypeMapDeep
- set
- unflattenObject
Predicate
Random
Simple
String
- camelCase
- capitalize
- capitalizeWord
- constantCase
- countOccurrences
- deburr
- dedent
- deleteSpaces
- ensurePrefix
- ensureSuffix
- escapeHtml
- formatString
- fromBase64
- fuzzySearch
- hasNoLetters
- kebabCase
- levenshteinDistance
- mask
- MaskOptions
- normalizeWhitespace
- padEnd
- padStart
- pascalCase
- randomString
- randomStringInitialization
- removePrefix
- removeSuffix
- reverseString
- sanitizeString
- slugify
- snakeCase
- splitByLength
- stringSimilarity
- stripAnsi
- stripTags
- swapCase
- titleCase
- toBase64
- toFullWidth
- toHalfWidth
- trimCharacters
- trimEndCharacters
- trimStartCharacters
- truncate
- uncapitalize
- unescapeHtml
- wordCount
- words
Time
Tool
UA
Unit
URL
Validate
- _Types
- _Types2
- _Types3
- _ValidateType
- _ValidateType2
- _ValidateType3
- any
- AnyReturnType
- arrayOf
- ArrayOfExtractValidatedType
- attachStandard
- bigint
- BigIntReturnType
- boolean
- BuildTemplateLiteral
- Constructor
- date
- double
- even
- exactLength
- ExtractInput
- ExtractOutput
- ExtractValidatorTag
- file
- func
- FunctionAnyValidator
- FunctionExtractValidatedType
- FunctionReturnType
- FunctionSchema
- FunctionValidator
- InferFunction
- InferInputs
- InferObject
- InferOutput
- instanceOf
- intersection
- IntersectionExtractValidatedType
- IntersectValidatedTypes
- isArray
- isBrowser
- isBun
- isDeepEqual
- IsDeepEqualOptions
- isDictionaryObject
- isDouble
- isEqual
- isNode
- isNodeWebkit
- isNotEmpty
- isNumber
- isPerfectSquare
- isPrimeNumber
- isString
- isValueNaN
- LiteralBrand
- map
- MapExtractValidatedType
- maxLength
- maxValue
- minLength
- minValue
- never
- NeverReturnType
- nullable
- NullReturn
- number
- numberString
- object
- ObjectShape
- ObjectShapeProperties
- ObjectValidator
- odd
- omitKeys
- oneOf
- OneOfReturnType
- optional
- OptionalKeys
- OptionalValidator
- parseEmail
- ParseEmailLevel
- ParseEmailOptions
- partial
- PartialShape
- PartToTemplate
- pickKeys
- prime
- regexMatch
- required
- RequiredShape
- SchemaToInterface
- SetExtractValidatedType
- setOf
- STANDARD_SCHEMA_VENDOR
- StandardSchemaV1
- StandardSchemaV1FailureResult
- StandardSchemaV1InferInput
- StandardSchemaV1InferOutput
- StandardSchemaV1Issue
- StandardSchemaV1PathSegment
- StandardSchemaV1Properties
- StandardSchemaV1Result
- StandardSchemaV1SuccessResult
- StandardSchemaV1Types
- string
- TagToTemplate
- templateLiteral
- TemplateLiteralAnyValidator
- TemplateLiteralPart
- TemplateLiteralReturnType
- Types
- UmtValidatorResult
- UndefinedReturn
- union
- UnionExtractValidatedType
- unknown
- UnknownReturnType
- UnwrapOptional
- uuid
- ValidateCoreReturnType
- validateEmail
- ValidateFunctionType
- ValidateReturnType
- ValidateType
