Git Product home page Git Product logo

NewDash

Github CI Deno CI

Codecov Quality Gate Status Security Rating 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

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>

Highlight

  • concurrency/limit - limit concurrency of async operations
  • Mutex - exclusive executing
  • hash - hash js object to stable string (MD5 based)
  • fallback - fallback functions for resilience
  • LRUMap and TTLMap - Map implementations which concern about eviction

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

New Dash's Projects

graphlib icon graphlib

A directed multi-graph library for JavaScript, graphlib with security update & type definition

marpit icon marpit

The skinny framework for creating slide deck from Markdown

quickjs icon quickjs

Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.

stompjs icon stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps

typeorm icon typeorm

ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.