The brass buckles on lodash's utility belt
- a home for functions that are limited in scope, but solve certain point problems, and
- a proving ground for features that belong in lodash proper, but need some advocacy and/or evolution (or devolution) to get them there.
First, you’ll need lodash. Then you can grab the relevant lodash-contrib libraries and simply add something like the following to your pages:
<script src="lodash.js"></script> <script src="lodash.object.builders.js"></script>
lodash-contrib in your main script file (e.g.
test.js) like so:
var _ = require('lodash-contrib'); // YOUR CODE COMES HERE console.log(_.truthyAll(0, 1, 2, 'lodash-contrib!'));
then you could run
browserify test.js -o browserified.js to get
lodash-contrib and your code into
npm install lodash-contrib, you don't need to have lodash as it will be grabbed as a dependency.
We need some docs sync since rebasing to version 3 (some methods renamed xxxContrib)
There is still a lot of work to do around perf, documentation, examples, testing and distribution so any help in those areas is welcomed. Pull requests are accepted, but please search the issues before proposing a new sub-contrib or addition. Additionally, all patches and proposals should have strong documentation, motivating cases and tests. It would be nice if we could not only provide useful tools built on lodash, but also provide an educational experience for why and how one might use them.
Other (potentially) useful sub-contribs include the following:
- String utilities
- Date/time utilities
What do these mean? Well, that’s up for discussion. :-)