UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

411 lines (410 loc) 15.9 kB
import { add } from "./add"; import { addPrefix } from "./addPrefix"; import { addSuffix } from "./addSuffix"; import { any } from "./any"; import { ary } from "./ary"; import { NewDashBaseError, TimeoutError } from "./assert/errors"; import { assign } from "./assign"; import { assignIn } from "./assignIn"; import { AsyncUtils } from "./async"; import { at } from "./at"; import { attempt } from "./attempt"; import { bind } from "./bind"; import { cacheIt } from "./cacheIt"; import { cacheItTTL } from "./cacheItTTL"; import { cacheProvider } from "./cacheProvider"; import { capitalize } from "./capitalize"; import { ceil } from "./ceil"; import { chunk } from "./chunk"; import { clone } from "./clone"; import { cloneDeep } from "./cloneDeep"; import { concat } from "./concat"; import { concurrency } from "./concurrency"; import { cond } from "./cond"; import { conforms } from "./conforms"; import { conformsTo } from "./conformsTo"; import { constant } from "./constant"; import { countBy } from "./countBy"; import { curry } from "./curry"; import { debounce } from "./debounce"; import { defaultsDeep } from "./defaultsDeep"; import { defaultTo } from "./defaultTo"; import { delay } from "./delay"; import { differenceBy } from "./differenceBy"; import { divide } from "./divide"; import { each } from "./each"; import { eq } from "./eq"; import { escapeRegExp } from "./escapeRegExp"; import { every } from "./every"; import { everyValue } from "./everyValue"; import { fallback } from "./fallback"; import { filter } from "./filter"; import { filterObject } from "./filterObject"; import { find } from "./find"; import { first } from "./first"; import { flatMap } from "./flatMap"; import { flatMapDeep } from "./flatMapDeep"; import { flatten } from "./flatten"; import { flattenDeep } from "./flattenDeep"; import { flip } from "./flip"; import { forEach } from "./forEach"; import { forOwn } from "./forOwn"; import { forOwnRight } from "./forOwnRight"; import { fromEntries } from "./fromEntries"; import { BlockedQueue } from "./functional/BlockedQueue"; import { hash } from "./functional/hash"; import { LRUMap } from "./functional/LRUMap"; import { Mutex } from "./functional/Mutex"; import { Semaphore } from "./functional/Semaphore"; import { timeIt } from "./functional/timeIt"; import { TTLMap } from "./functional/TTLMap"; import { functions } from "./functions"; import { get } from "./get"; import { groupBy } from "./groupBy"; import { has } from "./has"; import { head } from "./head"; import { includes } from "./includes"; import { indexOf } from "./indexOf"; import { initial } from "./initial"; import { intersection } from "./intersection"; import { intersectionBy } from "./intersectionBy"; import { intersectionWith } from "./intersectionWith"; import { invert } from "./invert"; import { invertBy } from "./invertBy"; import { invoke } from "./invoke"; import { invokeMap } from "./invokeMap"; import { isArguments } from "./isArguments"; import { isArray } from "./isArray"; import { isArrayLike } from "./isArrayLike"; import { isAsyncFunction } from "./isAsyncFunction"; import { isCircular } from "./isCircular"; import { isDate } from "./isDate"; import { isEmpty } from "./isEmpty"; import { isEqual } from "./isEqual"; import { isEqualWith } from "./isEqualWith"; import { isError } from "./isError"; import { isFunction } from "./isFunction"; import { isInstance } from "./isInstance"; import { isMap } from "./isMap"; import { isNull } from "./isNull"; import { isNumber } from "./isNumber"; import { isObject } from "./isObject"; import { isPlainObject } from "./isPlainObject"; import { isString } from "./isString"; import { isSubClass } from "./isSubClass"; import { join } from "./join"; import { keys } from "./keys"; import { last } from "./last"; import { lastIndexOf } from "./lastIndexOf"; import { logic } from "./logic"; import { lowerCase } from "./lowerCase"; import { lt } from "./lt"; import { map } from "./map"; import { mapKeys } from "./mapKeys"; import { mapValues } from "./mapValues"; import { matchesProperty } from "./matchesProperty"; import { max } from "./max"; import { maxBy } from "./maxBy"; import { mean } from "./mean"; import { meanBy } from "./meanBy"; import { memoize } from "./memoize"; import { merge } from "./merge"; import { mergeWith } from "./mergeWith"; import { method } from "./method"; import { methodOf } from "./methodOf"; import { min } from "./min"; import { minBy } from "./minBy"; import { omit } from "./omit"; import { over } from "./over"; import { overArgs } from "./overArgs"; import { overEvery } from "./overEvery"; import { overSome } from "./overSome"; import { pad } from "./pad"; import { padEnd } from "./padEnd"; import { padStart } from "./padStart"; import { partial } from "./partial"; import { pick } from "./pick"; import { pickBy } from "./pickBy"; import { pull } from "./pull"; import { pullAll } from "./pullAll"; import { pullAllWith } from "./pullAllWith"; import { pullAt } from "./pullAt"; import { random } from "./random"; import { range } from "./range"; import { reduce } from "./reduce"; import { reject } from "./reject"; import { remove } from "./remove"; import { repeat } from "./repeat"; import { replace } from "./replace"; import { retry } from "./retry"; import { series } from "./series"; import { set } from "./set"; import { size } from "./size"; import { sleep } from "./sleep"; import { slice } from "./slice"; import { some } from "./some"; import { someValues } from "./someValue"; import { sortBy } from "./sortBy"; import { sortedIndex } from "./sortedIndex"; import { sortedIndexBy } from "./sortedIndexBy"; import { sortedIndexOf } from "./sortedIndexOf"; import { sortedLastIndex } from "./sortedLastIndex"; import { sortedLastIndexBy } from "./sortedLastIndexBy"; import { sortedLastIndexOf } from "./sortedLastIndexOf"; import { sortedUniq } from "./sortedUniq"; import { sortedUniqBy } from "./sortedUniqBy"; import { split } from "./split"; import { closest, distance } from "./string"; import { sum } from "./sum"; import { sumBy } from "./sumBy"; import { take } from "./take"; import { takeRight } from "./takeRight"; import { throttle } from "./throttle"; import { createTimeoutPromise } from "./timeout"; import { times } from "./times"; import { toArray } from "./toArray"; import { toLower } from "./toLower"; import { toNumber } from "./toNumber"; import { toString } from "./toString"; import { toUpper } from "./toUpper"; import { trim } from "./trim"; import { trimEnd } from "./trimEnd"; import { trimPrefix } from "./trimPrefix"; import { trimStart } from "./trimStart"; import { trimSuffix } from "./trimSuffix"; import { union } from "./union"; import { unionBy } from "./unionBy"; import { uniq } from "./uniq"; import { uniqBy } from "./uniqBy"; import { uniqueId } from "./uniqueId"; import { uniqWith } from "./uniqWith"; import { unset } from "./unset"; import { unWrap } from "./unWrap"; import { update } from "./update"; import { values } from "./values"; import { words } from "./words"; import { wrap } from "./wrap"; export * from "./types"; export { filter, get, reduce, map, each, every, concat, first, attempt, forEach, merge, isEmpty, split, join, memoize, some, find, debounce, add, head, has, clone, cloneDeep, set, update, unset, capitalize, flatten, flattenDeep, flatMap, flatMapDeep, ceil, assign, assignIn, at, bind, filterObject, random, trimPrefix, trimSuffix, indexOf, last, lastIndexOf, lowerCase, lt, trimStart, trimEnd, isEqual, isError, isPlainObject, sum, sumBy, sortBy, pick, pickBy, delay, repeat, sleep, partial, range, any, uniq, isArray, take, size, isFunction, isArguments, isArrayLike, isAsyncFunction, isDate, isNull, isMap, isString, isObject, isNumber, times, max, min, maxBy, minBy, slice, replace, trim, keys, countBy, differenceBy, groupBy, curry, eq, constant, reject, ary, fromEntries, isEqualWith, everyValue, forOwn, forOwnRight, throttle, mapKeys, mapValues, remove, over, overArgs, overEvery, overSome, matchesProperty, pull, pullAll, pullAllWith, pullAt, takeRight, flip, intersection, intersectionBy, intersectionWith, someValues, invertBy, union, unionBy, method, mean, cond, sortedIndex, sortedIndexBy, sortedIndexOf, meanBy, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, uniqBy, uniqWith, sortedUniq, sortedUniqBy, toUpper, pad, padStart, padEnd, invoke, invokeMap, includes, conforms, conformsTo, defaultTo, methodOf, functions, divide, invert, mergeWith, toNumber, toArray, uniqueId, words, escapeRegExp, addSuffix, addPrefix, series, wrap, unWrap, createTimeoutPromise, TimeoutError, retry, concurrency, fallback, logic, isSubClass, cacheIt, cacheProvider, distance, closest, isInstance, values, chunk, cacheItTTL, initial, omit, Mutex, Semaphore, AsyncUtils, isCircular, toLower, timeIt, BlockedQueue, defaultsDeep, LRUMap, TTLMap, hash, NewDashBaseError, toString, }; /** * @ignore */ declare const _default: { filter: typeof filter; get: typeof get; reduce: typeof reduce; map: typeof map; each: typeof forEach; every: typeof every; concat: typeof concat; first: typeof first; attempt: typeof attempt; forEach: typeof forEach; merge: typeof merge; isEmpty: typeof isEmpty; split: typeof split; join: typeof join; memoize: typeof memoize; some: typeof some; find: typeof find; debounce: typeof debounce; add: typeof add; head: typeof head; has: typeof has; clone: typeof clone; cloneDeep: typeof cloneDeep; set: typeof set; update: typeof update; unset: typeof unset; capitalize: typeof capitalize; flatten: typeof flatten; flattenDeep: typeof flattenDeep; flatMap: typeof flatMap; flatMapDeep: typeof flatMapDeep; ceil: typeof ceil; assign: typeof assign; assignIn: typeof assignIn; at: typeof at; bind: typeof bind; filterObject: typeof filterObject; random: typeof random; trimPrefix: typeof trimPrefix; trimSuffix: typeof trimSuffix; indexOf: typeof indexOf; last: typeof last; lastIndexOf: typeof lastIndexOf; lowerCase: typeof lowerCase; lt: typeof lt; trimStart: typeof trimStart; trimEnd: typeof trimEnd; isEqual: typeof isEqual; isError: typeof isError; isPlainObject: typeof isPlainObject; sum: typeof sum; sumBy: typeof sumBy; sortBy: typeof sortBy; pick: typeof pick; pickBy: typeof pickBy; delay: typeof delay; repeat: typeof repeat; sleep: typeof sleep; partial: typeof partial; range: typeof range; any: typeof any; uniq: typeof uniq; isArray: typeof isArray; take: typeof take; size: typeof size; isFunction: typeof isFunction; isArguments: typeof isArguments; isArrayLike: typeof isArrayLike; isAsyncFunction: typeof isAsyncFunction; isDate: typeof isDate; isNull: typeof isNull; isMap: typeof isMap; isString: typeof isString; isObject: typeof isObject; isNumber: typeof isNumber; times: typeof times; max: typeof max; min: typeof min; maxBy: typeof maxBy; minBy: typeof minBy; slice: typeof slice; replace: typeof replace; trim: typeof trim; keys: typeof keys; countBy: typeof countBy; differenceBy: typeof differenceBy; groupBy: typeof groupBy; curry: typeof curry; eq: typeof eq; constant: typeof constant; reject: typeof reject; ary: typeof ary; fromEntries: typeof fromEntries; isEqualWith: typeof isEqualWith; everyValue: typeof everyValue; forOwn: typeof forOwn; forOwnRight: typeof forOwnRight; throttle: typeof throttle; mapKeys: typeof mapKeys; mapValues: typeof mapValues; remove: typeof remove; over: typeof over; overArgs: typeof overArgs; overEvery: typeof overEvery; overSome: typeof overSome; matchesProperty: typeof matchesProperty; pull: typeof pull; pullAll: typeof pullAll; pullAllWith: typeof pullAllWith; pullAt: typeof pullAt; takeRight: typeof takeRight; flip: typeof flip; intersection: typeof intersection; intersectionBy: typeof intersectionBy; intersectionWith: typeof intersectionWith; someValues: typeof someValues; invertBy: typeof invertBy; union: typeof union; unionBy: typeof unionBy; method: typeof method; mean: typeof mean; cond: typeof cond; sortedIndex: typeof sortedIndex; sortedIndexBy: typeof sortedIndexBy; sortedIndexOf: typeof sortedIndexOf; meanBy: typeof meanBy; sortedLastIndex: typeof sortedLastIndex; sortedLastIndexBy: typeof sortedLastIndexBy; sortedLastIndexOf: typeof sortedLastIndexOf; uniqBy: typeof uniqBy; uniqWith: typeof uniqWith; sortedUniq: typeof sortedUniq; sortedUniqBy: typeof sortedUniqBy; toUpper: typeof toUpper; pad: typeof pad; padStart: typeof padStart; padEnd: typeof padEnd; invoke: typeof invoke; invokeMap: typeof invokeMap; includes: typeof includes; conforms: typeof conforms; conformsTo: typeof conformsTo; defaultTo: typeof defaultTo; methodOf: typeof methodOf; functions: typeof functions; divide: typeof divide; invert: typeof invert; mergeWith: typeof mergeWith; toNumber: typeof toNumber; toArray: typeof toArray; uniqueId: typeof uniqueId; words: typeof words; escapeRegExp: typeof escapeRegExp; addSuffix: typeof addSuffix; addPrefix: typeof addPrefix; series: typeof series; wrap: typeof wrap; unWrap: typeof unWrap; createTimeoutPromise: typeof createTimeoutPromise; TimeoutError: typeof TimeoutError; retry: typeof retry; concurrency: { limit: typeof import("./concurrency/limit").limit; timeout: typeof import("./concurrency/timeout").timeout; any: typeof any; series: typeof series; debounce: typeof import("./concurrency/debounce").debounce; synchronized: typeof import("./concurrency/limit").synchronized; reuse: typeof import("./concurrency/reuse").reuse; }; fallback: { cache: typeof import("./fallback/cache").fallbackCache; retry: typeof import("./fallback/retry").fallbackRetry; circuit: typeof import("./fallback/circuit").circuit; recommend: typeof import("./fallback").recommend; }; logic: { asyncAllTrue: typeof import("./logic").asyncAllTrue; asyncAnyTrue: typeof import("./logic").asyncAnyTrue; allTrue: typeof import("./logic").allTrue; anyTrue: typeof import("./logic").anyTrue; }; isSubClass: typeof isSubClass; cacheIt: typeof cacheIt; cacheProvider: { LRUCacheProvider: typeof import("./cacheProvider").LRUCacheProvider; TTLCacheProvider: typeof import("./cacheProvider").TTLCacheProvider; }; distance: typeof distance; closest: typeof closest; isInstance: typeof isInstance; values: typeof values; chunk: typeof chunk; cacheItTTL: typeof cacheItTTL; initial: typeof initial; omit: typeof omit; Mutex: typeof Mutex; Semaphore: typeof Semaphore; AsyncUtils: { filter: typeof import("./async/filter").filter; map: typeof import("./async/map").map; allSettled: typeof import("./async/allSettled").allSettled; any: typeof any; timeout: typeof createTimeoutPromise; LazyPromise: typeof import("./async/LazyPromise").LazyPromise; }; isCircular: typeof isCircular; toLower: typeof toLower; timeIt: typeof timeIt; BlockedQueue: typeof BlockedQueue; defaultsDeep: typeof defaultsDeep; LRUMap: typeof LRUMap; TTLMap: typeof TTLMap; hash: typeof hash; NewDashBaseError: typeof NewDashBaseError; toString: typeof toString; }; export default _default;