Code Monkey home page Code Monkey logo

lodash's Introduction

Lo-Dash v2.0.0

A utility library delivering consistency, customization, performance, & extras.

Download

Love modules? We’ve got you covered with lodash-amd, lodash-node, and npm packages per method.

CDN copies are available on cdnjs & jsDelivr.
For smaller file sizes, create custom builds with only the features needed.

Dive in

There’s plenty of documentation, unit tests, & benchmarks.

For a list of upcoming features, check out our roadmap.

Features not in Underscore

Resources

  • Posts
  • Videos

Support

Tested in Chrome 529, Firefox 223, IE 6-10, Opera 9.25~15, Safari 3-6, Node.js 0.6.8-0.10.18, Narwhal 0.3.2, PhantomJS 1.9.1, RingoJS 0.9, & Rhino 1.7RC5.

Installation & usage

In browsers:

<script src="lodash.js"></script>

Using npm:

npm i lodash

{sudo} npm i -g lodash
npm link lodash

In Node.js & Ringo:

var _ = require('lodash');
// or as Underscore
var _ = require('lodash/dist/lodash.underscore');

Notes:

  • Don’t assign values to special variable _ when in the REPL
  • If Lo-Dash is installed globally, run npm link lodash in your project’s root directory before requiring it
  • Node.js 0.10.8-0.10.11 have bugs preventing minified builds

In Rhino:

load('lodash.js');

In an AMD loader:

require({
  'packages': [
    { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }
  ]
},
['lodash'], function(_) {
  console.log(_.VERSION);
});

Release Notes

v2.0.0

Compatibility Warnings

  • Aligned _.after with Underscore 1.5.0, making it always return a function

Noteable Changes

Other Changes

  • Added Curl & Dojo module loaders to the unit tests
  • Added the modularize build option
  • Added support for the iife command to be used without an %output% token
  • Added support for _.mixin to accept a destination object
  • Added support for _.range to accept a step of 0
  • Added _.eachRight as an alias for _.forEachRight
  • Ensured “Arrays” methods support arguments objects
  • Ensured “Functions” methods throw when not passed functions
  • Ensured _.at works as a callback for _.map
  • Ensured _.createCallback works when no argCount is specified
  • Ensured _.first & _.last return arrays when passed a falsey array with an n value
  • Ensured _.flatten works with arguments objects
  • Ensured minified files work with Dojo’s builder
  • Ensured _.zipObject skips falsey elements
  • Improved dead code removal from builds
  • Improved JSDoc syntax
  • Made _.memoize avoid prefixing cache keys when using a resolver function
  • Made _.unzip an alias of _.zip
  • Removed local clearTimeout & setTimeout variables from the underscore build
  • Reduced the size of the repo & npm package
  • Simplified the bailout in createCache
  • Updated sourceURL & sourceMappingURL syntax
  • Updated underscore build compatibility to v1.5.2

The full changelog is available here.

BestieJS

Lo-Dash is part of the BestieJS “Best in Class” module collection. This means it promotes solid environment support, ES5+ precedents, unit testing, & plenty of documentation.

Author

twitter/jdalton
John-David Dalton

Contributors

twitter/blainebublitz twitter/kitcambridge twitter/mathias
Blaine Bublitz Kit Cambridge Mathias Bynens

lodash's People

Contributors

adamcraven avatar alanhogan avatar braddunbar avatar brianhaveri avatar chaoflow avatar danheberden avatar iamnoah avatar jashkenas avatar jasondavies avatar jdalton avatar jeffamcgee avatar jrburke avatar kishanov avatar kriskowal avatar lifesinger avatar malclocke avatar mark-rushakoff avatar mathiasbynens avatar maw avatar mcmire avatar michaelficarra avatar octatone avatar phated avatar ratbeard avatar rfletcher avatar ryantenney avatar samuelclay avatar stuk avatar tombyrer avatar yuchi avatar

Watchers

 avatar  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.