1.1.0 • Published 7 years ago

lodash-collection-helpers v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Lodash Collection Helpers

Lodash plugin library for additional collection functions

NPM version NPM downloads Build Status Dependency Status devDependencies Status MIT License

Table of Contents

  1. Installation

  2. Usage

  3. Lodash Integration

  4. Contributing

  5. Coverage Details

  6. Release History

Installation

Installation TypeCommand
npmnpm install lodash-collection-helpers --save
bowerbower install lodash-collection-helpers
yarnyarn add lodash-collection-helpers

Usage

var collectionHelpers = require('lodash-collection-helpers');

Need an ES5 version?

var collectionHelpers = require('lodash-collection-helpers/dist/lodash-collection-helpers-es5');
Available Helpers in the Library
isCollection
pickAs
pickAllAs
select
selectAll
joinOn
leftJoin
rightJoin
innerJoin
fullJoin
leftAntiJoin
rightAntiJoin
fullAntiJoin
getCollectionHelpers
indexBy
uniqify

For further instruction on how to use this library please referense the Documentation

Lodash Integration

Prefer to call these helpers directlly from your projest's lodash reference? Simply execute code like this example below and you are all set.

var collectionHelpers = require('lodash-collection-helpers');
var _ = require('lodash');
_.mixin(collectionHelpers.getCollectionHelpers());
Integrated Lodash Function
_.isCollection
_.pickAs
_.pickAllAs
_.select
_.selectAll
_.joinOn
_.leftJoin
_.rightJoin
_.innerJoin
_.fullJoin
_.leftAntiJoin
_.rightAntiJoin
_.fullAntiJoin
_.indexBy
_.uniqify

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Frequently Used Dev Commands

CommandDescription
npm testGenerates and runs all unit and coverage tests
npm run bundleTranspiles source code to ES5 file, minifys ES5 code to minified file, then builds README.md file A wrapper for gulp package
npm run documantationBuilds DOCUMENTATION.md file from JSDocs in source file
npm run buildRuns all 3 of the following commands: npm run documantationnpm run bundlenpm test

Other Dev Commands

CommandDescription
npm run unitRuns all unit and coverage tests
npm run bower-unitRuns all unit tests for ES5 and minified ES5 files
npm run generate-unitGenerates all other related unit test files
npm run coverageRuns coverage tests. ES5 and minified ES5 files are not counted in coverage since it is transpiled by gulp-babel and assumed to be working code.
gulp build-readmeBuilds README.md file
gulp transpileTranspiles source code to ES5 file
gulp minifyTranspiles source code to ES5 file and minifys ES5 code to minified file
gulp packageTranspiles source code to ES5 file, minifys ES5 code to minified file, then builds README.md file

See CODE OF CONDUCT for general contribution rules

Coming Soon

A more detailed page for Contributing.

Coverage Details

Lines

TotalCoveredSkippedPercent
73730100

#c5f015 Good to go!

Statements

TotalCoveredSkippedPercent
73732100

#c5f015 Good to go!

Functions

TotalCoveredSkippedPercent
30300100

#c5f015 Good to go!

Branches

TotalCoveredSkippedPercent
48485100

#c5f015 Good to go!

Release History

1.1.01.0.0

Return to Top