5.22.1 • Published 14 days ago
@newdash/newdash-es6 v5.22.1
NewDash
NewDash is a hard fork of the lodash utility project, and re-build it with typescript
.
Quick Start
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
CHANGELOG
LICENSE
5.22.1
14 days ago
5.22.0
1 year ago
5.22.0-0
1 year ago
5.21.4
2 years ago
5.21.3
2 years ago
5.21.2
2 years ago
5.21.1
2 years ago
5.21.0
2 years ago
5.20.0
3 years ago
5.19.0
3 years ago
5.18.0
3 years ago
5.17.1
4 years ago
5.17.0
4 years ago
5.16.0
4 years ago
5.15.0
4 years ago
5.14.0
4 years ago
5.13.0
4 years ago
5.12.2
4 years ago
5.12.1
4 years ago
5.12.0
4 years ago
5.11.0
4 years ago
5.10.0
4 years ago
5.9.0
4 years ago
5.8.0
4 years ago
5.7.0
4 years ago
5.6.0
4 years ago
5.5.0
4 years ago
5.4.1
4 years ago
5.3.0
4 years ago