• Jump To … +
    _.array.builders.js.md _.array.selectors.js.md _.collections.walk.js.md _.function.arity.js.md _.function.combinators.js.md _.function.iterators.js.md _.function.predicates.js.md _.object.builders.js.md _.object.selectors.js.md _.util.existential.js.md _.util.operators.js.md _.util.strings.js.md _.util.trampolines.js.md index.md
  • ¶

    lodash-contrib

    The brass buckles on lodash’s utility belt - a contributors’ library for lodash.

    Introduction

    Places

    • Documentation
    • Source repository
    • Tickets and bug reports

    Why lodash-contrib?

    While lodash provides a bevy of useful tools to support functional programming in JavaScript, it can’t (and shouldn’t) be everything to everyone. lodash-contrib is intended as a home for functions that, for various reasons, don’t belong in lodash proper. In particular, it aims to be:

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

    Use

    In the Browser

    First, you’ll need lodash. Then you can grab the relevant lodash-contrib libraries and simply add the following to your pages:

    <script type="text/javascript" src="lodash.js"></script>
    <script type="text/javascript" src="lodash.object.builders.js"></script>
    

    At the moment there are no cross-contrib dependencies (i.e. each sub-library can stand by itself), but that may change in the future.

    License

    lodash-contrib is open sourced under the MIT license.

    Sub-libraries

    The lodash-contrib library currently contains a number of related capabilities, aggregated into the following files.

    • _.array.builders - functions to build arrays
    • _.array.selectors - functions to take things from arrays
    • _.collections.walk - functions to walk and transform nested JavaScript objects
    • _.function.arity - functions to manipulate and fix function argument arity
    • _.function.combinators - functions to combine functions to make new functions
    • _.function.iterators - functions to lazily produce, manipulate and consume sequence iterators
    • _.function.predicates - functions that return true or false based on some criteria
    • _.object.builders - functions to build JavaScript objects
    • _.object.selectors - functions to pick things from JavaScript objects
    • _.util.existential - functions that check for the existence or truthiness of JavaScript data types
    • _.util.operators - functions that wrap common (or missing) JavaScript operators
    • _.util.strings - functions to work with strings
    • _.util.trampolines - functions to facilitate calling functions recursively without blowing the stack

    The links above are to the annotated source code. Full-blown _.contrib documentation is in the works. Contributors welcomed.