Code Monkey home page Code Monkey logo

newdash's Introduction

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

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>

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

newdash's People

Contributors

adamcraven avatar blikblum avatar bnjmnt4n avatar braddunbar avatar danallison avatar danheberden avatar dependabot-preview[bot] avatar falsyvalues avatar filipzawada avatar greenkeeperio-bot avatar iamnoah avatar jashkenas avatar jasondavies avatar jdalton avatar jfmengels avatar jridgewell avatar mathiasbynens avatar megawac avatar michaelficarra avatar octatone avatar octref avatar phated avatar pimterry avatar ratbeard avatar rheh avatar ryantenney avatar samuelclay avatar soontao avatar tombyrer avatar younesfkihi avatar

Watchers

 avatar

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.