JSPM

  • Created
  • Published
  • Downloads 10619
  • Score
    100M100P100Q146604F
  • License MIT

javascript utility library

Package Exports

  • @newdash/newdash
  • @newdash/newdash/attempt
  • @newdash/newdash/concat
  • @newdash/newdash/flatten
  • @newdash/newdash/groupBy
  • @newdash/newdash/isArray
  • @newdash/newdash/join
  • @newdash/newdash/maxBy
  • @newdash/newdash/slice
  • @newdash/newdash/startsWith
  • @newdash/newdash/uniq

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

CircleCI GitHub Workflow Status GitHub Workflow Status

Codecov Quality Gate Status Security Rating Total alerts Netlify

npm (scoped) npm (scoped) npm (scoped) npm (scoped) npm (scoped)

NewDash is a hard fork of the lodash utility project, and re-build it with typescript.

Quick Start

Traditional NodeJS

// 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 Language

// import { add } from "https://cdn.jsdelivr.net/npm/@newdash/newdash-deno@5.9.0/index.ts"
import { add } from "https://cdn.jsdelivr.net/npm/@newdash/newdash-deno@5.9.0/add.ts"

add(1, 2)
// => 3
add('1', '2')
// => '12'
add('1', 2) // typescript type check for deno
// throw error: TS2345 [ERROR]: Argument of type '2' is not assignable to parameter of type '"1"'.

API Document

Different Release

In most cases, just use the @newdash/newdash package is enough.

  • @newdash/newdash - for modern nodejs environment, ready for all build tools which based on the nodejs commonjs 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 old nodejs environment, ready for 0.12 <= node version <= 8.
  • @newdash/newdash-es6 - for modern build system, with es6 module keywords so that build tool could strip the unused modules.
  • @newdash/newdash-umd - for native browser without any build system, please access it with unpkg or jsdeliver

CHANGELOG

LICENSE