@pengzhanbo/utils - v3.9.0
    Preparing search index...

    @pengzhanbo/utils - v3.9.0

    A common JavaScript utility library, zero dependencies, any runtime.

    一个常用的工具类库, 无依赖, 任何运行时。

    jsr package jsr score MIT License npm package codecov document coverage

    # npm
    npm i @pengzhanbo/utils
    # pnpm
    pnpm add @pengzhanbo/utils
    # yarn
    yarn add @pengzhanbo/utils
    # bun
    bun add @pengzhanbo/utils
    # deno
    deno add jsr:@pengzhanbo/utils
    import { uniq, toArray } from '@pengzhanbo/utils'

    uniq([1, 1, 2, 2, 3, 3]) // => [1, 2, 3]
    toArray(null) // => []
    toArray(2) // => [2]
    isArray
    isBlob
    isBoolean
    isBrowser
    isBuffer
    isDate
    isDef
    isEmpty
    isEmptyObject
    isError
    isFinite
    isFunction
    isInteger
    isIterable
    isJSONArray
    isJSONObject
    isJSONValue
    isKeyof
    isMap
    isNil
    isNull
    isNumber
    isPlainObject
    isPrimitive
    isPromise
    isPromiseLike
    isRegexp
    isSafeInteger
    isSet
    isString
    isSymbol
    isTypedArray
    isTypeof
    isUndefined
    isWindow
    typeOf
    ArrayIterator
    chunk
    count
    countBy
    difference
    differenceBy
    filterAsync
    findFirstThen
    findLastThen
    groupBy
    intersection
    intersectionBy
    keyBy
    mapAsync
    move
    orderBy
    partition
    range
    remove
    removeBy
    sample
    sampleSize
    shuffle
    sortBy
    toArray
    union
    unionBy
    uniq
    uniqBy
    uniqWith
    ObjectIterator
    clearUndefined
    deepEqual
    deepFreeze
    deepMerge
    deepMergeWithArray
    deleteKey
    hasOwn
    objectEntries
    objectGet
    objectKeys
    objectMap
    omit
    omitBy
    pick
    pickBy
    camelCase
    capitalize
    constantCase
    ensurePrefix
    ensureSuffix
    escape
    escapeRegExp
    indent
    kebabCase
    lowerCase
    pascalCase
    slugify
    snakeCase
    template
    titleCase
    truncate
    unescape
    upperCase
    words
    Semaphore
    delay
    createControlledPromise
    createPromiseLock
    createSingletonPromise
    deferred
    limitAsync
    promiseParallel
    promiseParallelSettled
    retry
    sleep
    timeout
    withTimeout
    compose
    debounce
    invoke
    memoize
    noop
    once
    pipe
    tap
    throttle
    isSameDay
    timestamp
    notNullish
    notUndefined
    toError
    toFinite
    toNumber
    toString
    toTruthy
    clamp
    decimalAdd
    decimalDivide
    decimalMultiply
    decimalSubtract
    degToRad
    gcd
    inRange
    isPrime
    lcm
    lerp
    mapRange
    mean
    median
    radToDeg
    random
    sum
    Arrayable
    AsyncFn
    AsyncReturnType
    Awaitable
    BuiltIns
    Constructor
    DeepPartial
    DeepReadonly
    DeepRequired
    ElementOf
    Finite
    Float
    Fn
    If
    IfAny
    IfNever
    IfNotAnyOrNever
    IfNull
    IfUndefined
    IfUnknown
    Integer
    IsAny
    IsAnyOrNever
    IsEqual
    IsFloat
    IsInteger
    IsNever
    IsNotFalse
    IsNull
    IsNullable
    IsPrimitive
    IsUndefined
    IsUnion
    IsUnknown
    LiteralUnion
    LooseRequired
    Negative
    NegativeFloat
    NegativeInfinity
    NegativeInteger
    NonRecursiveType
    Not
    Nullable
    OptionalKeys
    PositiveInfinity
    Prettify
    Primitive
    RequiredKeys
    UnionToIntersection
    UnionToTuple
    combineURLs
    ensureLeadingSlash
    ensureTrailingSlash
    isHttp
    isUrl
    parseProtocol
    removeLeadingSlash
    removeTrailingSlash
    slash
    LRUCache
    assert
    attempt
    attemptAsync
    timing
    AbortError
    RetryError
    TimeoutError
    createEmitter
    deepClone
    shallowClone
    simpleClone
    <internal>
    ControlledPromise
    DebounceOptions
    Deferred
    EventEmitter
    LRUCacheOptions
    LRUCacheSetOptions
    MemoizeOptions
    RetryOptions
    SingletonPromise
    SleepOptions
    ThrottleOptions
    WithTimeoutOptions
    WithTimeoutResult
    ArrayIteratorCallback
    ArrayIteratorPredicate
    ArrayIteratorTransform
    EventListener
    EventListenerList
    EventListenerMap
    EventType
    EventWildcardListener
    EventWildcardListenerList
    InternalIsUnion
    LastOfUnion
    MemoizedFn
    ObjectIteratorPredicate
    ObjectIteratorTransform
    RetryablePromise
    Zero