lodash-amd

A collection of Lo-Dash methods as AMD modules generated by lodash-cli.

npm install lodash-amd
24 downloads in the last month

lodash-amd v2.4.1

A collection of Lo-Dash methods as AMD modules generated by lodash-cli.

Packages

Define a build as 'lodash' (instead of 'lodash-amd/{build}')

require({
  'packages': [
    { 'name': 'lodash', 'location': 'lodash-amd/modern' }
  ]
}, ['lodash/collections/forEach'], function(forEach) {
  // use `forEach`
});

Migrations

Easily migrate Underscore code to Lo-Dash code.

require({
  'packages': [
    { 'name': 'lodash', 'location': 'lodash-amd/compat' },
    { 'name': 'underscore', 'location': 'lodash-amd/underscore' }
  ]
}, [], function() {});

When working with code that must have Underscore compatibility, just import the 'underscore' dependency. If you don’t need Underscore compatibility & want the benefits of Lo-Dash, import the 'lodash' dependency. You can even mix & match.

define(['underscore', 'lodash/objects/transform'], function(_, transform) {
  // use `_` prefixed code with underscore
  // use `transform` from lodash
});

Eventually, when Underscore compatibility is no longer needed, just switch your packages configuration.

require({
  'packages': [
    { 'name': 'lodash', 'location': 'lodash-amd/compat' },
    { 'name': 'underscore', 'location': 'lodash-amd/compat' }
  ]
}, [], function() {});

Author

twitter/jdalton
John-David Dalton

Contributors

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

Bitdeli Badge

npm loves you