lodash-collection-helpers
v1.1.0
Published
Lodash plugin library for additional collection functions
Downloads
36
Maintainers
Keywords
Readme
Lodash Collection Helpers
Lodash plugin library for additional collection functions
Table of Contents
Installation
| Installation Type | Command | | :----: | ---- | | npm | npm install lodash-collection-helpers --save | | bower | bower install lodash-collection-helpers | | yarn | yarn 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
| Command | Description | | ---- | ---- | | npm test | Generates and runs all unit and coverage tests | | npm run bundle | Transpiles source code to ES5 file, minifys ES5 code to minified file, then builds README.md file A wrapper for gulp package | | npm run documantation | Builds DOCUMENTATION.md file from JSDocs in source file | | npm run build | Runs all 3 of the following commands: npm run documantationnpm run bundlenpm test |
Other Dev Commands
| Command | Description | | ---- | ---- | | npm run unit | Runs all unit and coverage tests | | npm run bower-unit | Runs all unit tests for ES5 and minified ES5 files | | npm run generate-unit | Generates all other related unit test files | | npm run coverage | Runs 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-readme | Builds README.md file | | gulp transpile | Transpiles source code to ES5 file | | gulp minify | Transpiles source code to ES5 file and minifys ES5 code to minified file | | gulp package | Transpiles 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
| Total | Covered | Skipped | Percent |
| ---- | ---- | ---- | ---- |
| 73 | 73 | 0 | 100 |
Good to go!
Statements
| Total | Covered | Skipped | Percent |
| ---- | ---- | ---- | ---- |
| 73 | 73 | 2 | 100 |
Good to go!
Functions
| Total | Covered | Skipped | Percent |
| ---- | ---- | ---- | ---- |
| 30 | 30 | 0 | 100 |
Good to go!
Branches
| Total | Covered | Skipped | Percent |
| ---- | ---- | ---- | ---- |
| 48 | 48 | 5 | 100 |
Good to go!