Package Exports
- @newdash/newdash
- @newdash/newdash/.internal/identity
- @newdash/newdash/.internal/identity.js
- @newdash/newdash/attempt
- @newdash/newdash/attempt.js
- @newdash/newdash/cacheProvider
- @newdash/newdash/cacheProvider.js
- @newdash/newdash/capitalize
- @newdash/newdash/capitalize.js
- @newdash/newdash/clone
- @newdash/newdash/clone.js
- @newdash/newdash/cloneDeep
- @newdash/newdash/cloneDeep.js
- @newdash/newdash/concat
- @newdash/newdash/concat.js
- @newdash/newdash/concurrency
- @newdash/newdash/concurrency/index.js
- @newdash/newdash/constant
- @newdash/newdash/constant.js
- @newdash/newdash/defaultTo
- @newdash/newdash/defaultTo.js
- @newdash/newdash/defaultsDeep
- @newdash/newdash/defaultsDeep.js
- @newdash/newdash/each
- @newdash/newdash/each.js
- @newdash/newdash/filter
- @newdash/newdash/filter.js
- @newdash/newdash/find
- @newdash/newdash/find.js
- @newdash/newdash/flatten
- @newdash/newdash/flatten.js
- @newdash/newdash/flattenDeep
- @newdash/newdash/flattenDeep.js
- @newdash/newdash/forEach
- @newdash/newdash/forEach.js
- @newdash/newdash/functional/LRUMap
- @newdash/newdash/functional/LRUMap.js
- @newdash/newdash/functional/Mutex
- @newdash/newdash/functional/Mutex.js
- @newdash/newdash/functional/MutexMap
- @newdash/newdash/functional/MutexMap.js
- @newdash/newdash/functional/Semaphore
- @newdash/newdash/functional/Semaphore.js
- @newdash/newdash/functional/TTLMap
- @newdash/newdash/functional/TTLMap.js
- @newdash/newdash/functional/toHashCode
- @newdash/newdash/functional/toHashCode.js
- @newdash/newdash/get
- @newdash/newdash/get.js
- @newdash/newdash/groupBy
- @newdash/newdash/groupBy.js
- @newdash/newdash/has
- @newdash/newdash/has.js
- @newdash/newdash/includes
- @newdash/newdash/includes.js
- @newdash/newdash/index.js
- @newdash/newdash/intersection
- @newdash/newdash/intersection.js
- @newdash/newdash/isArray
- @newdash/newdash/isArray.js
- @newdash/newdash/isArrayLike
- @newdash/newdash/isArrayLike.js
- @newdash/newdash/isClass
- @newdash/newdash/isClass.js
- @newdash/newdash/isEmpty
- @newdash/newdash/isEmpty.js
- @newdash/newdash/isEqual
- @newdash/newdash/isEqual.js
- @newdash/newdash/isFunction
- @newdash/newdash/isFunction.js
- @newdash/newdash/isPlainObject
- @newdash/newdash/isPlainObject.js
- @newdash/newdash/isUndefined
- @newdash/newdash/isUndefined.js
- @newdash/newdash/join
- @newdash/newdash/join.js
- @newdash/newdash/keys
- @newdash/newdash/keys.js
- @newdash/newdash/map
- @newdash/newdash/map.js
- @newdash/newdash/maxBy
- @newdash/newdash/maxBy.js
- @newdash/newdash/pick
- @newdash/newdash/pick.js
- @newdash/newdash/reduce
- @newdash/newdash/reduce.js
- @newdash/newdash/retry
- @newdash/newdash/retry.js
- @newdash/newdash/size
- @newdash/newdash/size.js
- @newdash/newdash/slice
- @newdash/newdash/slice.js
- @newdash/newdash/sortBy
- @newdash/newdash/sortBy.js
- @newdash/newdash/startsWith
- @newdash/newdash/startsWith.js
- @newdash/newdash/string/distance
- @newdash/newdash/string/distance.js
- @newdash/newdash/toInteger
- @newdash/newdash/toInteger.js
- @newdash/newdash/toNumber
- @newdash/newdash/toNumber.js
- @newdash/newdash/transform
- @newdash/newdash/transform.js
- @newdash/newdash/trimPrefix
- @newdash/newdash/trimPrefix.js
- @newdash/newdash/trimSuffix
- @newdash/newdash/trimSuffix.js
- @newdash/newdash/union
- @newdash/newdash/union.js
- @newdash/newdash/uniq
- @newdash/newdash/uniq.js
- @newdash/newdash/upperFirst
- @newdash/newdash/upperFirst.js
- @newdash/newdash/values
- @newdash/newdash/values.js
- @newdash/newdash/zipObject
- @newdash/newdash/zipObject.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@newdash/newdash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NewDash
NewDash is a hard fork of the lodash utility project, and re-build it with typescript
.
Quick Start
ESM
import first from "@newdash/newdash-es6/first" // only load `first` function
first("abc")
// => "a"
NodeJS
works as you want.
// const { first } = require("@newdash/newdash")
const { first } = require("@newdash/newdash/first") // Compatible with es6 module
first("abc")
// => "a"
ES6 or Typescript
// import { first } from "@newdash/newdash" // load all functions of @newdash
import first from "@newdash/newdash/first" // only load `first` function
first("abc")
// => "a"
Deno Runtime
import from CDN, remember to add .ts
suffix.
// import { add } from "https://cdn.jsdelivr.net/npm/@newdash/newdash-deno/index.ts"
import { add } from "https://cdn.jsdelivr.net/npm/@newdash/newdash-deno/add.ts"
add(1, 2)
// => 3
add('1', '2')
// => '12'
add('1', 2) // different types
// throw error: TS2345 [ERROR]: Argument of type '2' is not assignable to parameter of type '"1"'.
UMD Module (Browser Native)
just introduce script
with html.
<script src="https://cdn.jsdelivr.net/npm/@newdash/newdash-umd/newdash.min.js"></script>
API Document
Highlight
concurrency/limit
- limit concurrency of async operationsMutex
- exclusive executinghash
- hash js object to stable string (MD5 based)fallback
- fallback functions for resilienceLRUMap
andTTLMap
- Map implementations which concern about eviction
Different Release
In most cases, just use the @newdash/newdash
package is enough.
@newdash/newdash
- for modernnodejs
environment, ready for all build tools which based on the nodejscommonjs
module system (node, react, vuejs, webpack and more).@newdash/newdash-deno
- for deno language support, with some transform, like add the '.ts' suffix for modules.@newdash/newdash-es5
- for oldnodejs
environment, ready for0.12 <= node version <= 8
.@newdash/newdash-es6
- for modern build system, withes6
module keywords so that build tool could strip the unused modules.@newdash/newdash-umd
- for native browser without any build system, please access it withunpkg
orjsdeliver