🚧 Notice 🚧
Pardon the mess. The
master branch is in flux while we work on Lodash v5. This
means things like npm scripts, which we encourage using for contributions, may
not be working. Thank you for your patience.
Contributing to Lodash
Contributions are always welcome. Before contributing please read the
code of conduct &
search the issue tracker; your issue
may have already been discussed or fixed in
master. To contribute,
fork Lodash, commit your changes,
& send a pull request.
Feature requests should be submitted in the
issue tracker, with a description of
the expected behavior & use case, where they’ll remain closed until sufficient interest,
For additions or bug fixes you should only need to modify
updated unit tests in the
test directory as part of your pull request. Don’t
worry about regenerating the
Before running the unit tests you’ll need to install,
Run unit tests from the command-line via
npm test, or open
test/fp.html in a web browser. The Backbone &
Underscore test suites are included as well.
Contributor License Agreement
For more information about CLAs, please check out Alex Russell’s excellent post, “Why Do I Need to Sign This?”.
In addition to the following guidelines, please follow the conventions already established in the code.
Use two spaces for indentation. No tabs.
Keep variable & method names concise & descriptive.
iterateeare preferable to
Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.
Please use single-line comments to annotate significant additions, & JSDoc-style comments for functions.
Guidelines are enforced using ESLint:
$ npm run style
You can opt-in to a pre-push git hook by adding an
.opt-in file to the root of
the project containing:
With that, when you
git push, the pre-push git hook will trigger and execute
npm run validate.