lodash-joins

Join algorithms for JavaScript Arrays using lodash

APACHE-2.0 License

Downloads
4.5K
Stars
127
Committers
8
lodash-joins - Correcting umd export Latest Release

Published by mtraynham over 3 years ago

The switch from babel to typescript dropped the babel-plugin-add-module-exports with this commit. This corrects that same issue for Typescript where an import would return an object with a single default key. Instead it now correctly returns the default export.

lodash-joins - 3.1.0 - Bugfix/Webpack 5

Published by mtraynham over 3 years ago

Fixes a bug with the typings and upgrades to Webpack 5 for client bundling.

lodash-joins - 3.0.1 - Correction to package inclusion

Published by mtraynham over 4 years ago

  • Incorporates index.lodash.d.ts in the install, #19
lodash-joins - 3.0.0 - Wow it's been a while :P

Published by mtraynham over 4 years ago

This release is a full restructure and migration of the project to using TypeScript. Some other additions are:

  • Added a secondary distribution dist/joins.js. This is a bundle that does not wrap the join functions in a new lodash context. You instead require each join independently (import {hashLeftOuterJoin} from 'lodash-joins/dist/joins). I eventually plan to move the project to this import structure, as it's much more modular.
  • Added a 5th parameter to join functions called a merger. Originally, lodash-joins would just assign both the left and right row to an object, but now users can provide a merger function to return whatever they want. This has been defaulted to the old assign method for compatibility.
lodash-joins - Pre-Release: Update TypeScript definition and link with npm

Published by mtraynham about 7 years ago

#10 - update package.json to connect typings d.ts file (thanks goes to @breath103)

lodash-joins - Pre-Release: Adding a merger function for merge type joins

Published by mtraynham over 7 years ago

The merger function offers an alternative to handling merge type joins (outer/inner/left-outer/right-outer). Instead of using lodash's _.assign to create a new row, users can now provide a function that will create a merged row.

function defaultMerger (left: LeftType, right: RightType): LeftType & RightType {
     return Object.assign({}, left, right);
}

function leftRightMerger (left: LeftType, right: RightType): {left: LeftType, right: RightType} {
     return {left, right};
}

The merge function will be called for all records of the output array, including rows that are not merged. In those cases, either the left or right record will be null.

lodash-joins - Update Dependencies and Add TypeScript definition

Published by mtraynham over 7 years ago

No significant code changes.

  • Add TypeScript definition file
  • Webpack upgraded from 1.x to 3.x
  • Use Jasmine instead of Mocha/Chai
  • Use Chrome Headless for testing
lodash-joins - Updates

Published by mtraynham almost 8 years ago

No major code changes, just dependency updates and test suite enhancements.

lodash-joins - Add JSDoc and ESLint

Published by mtraynham over 8 years ago

Minor changes to actual code. Changes to documentation and code style (using ESLint with AirBnB config).

lodash-joins - 2.0! Upgrade to Lodash 4

Published by mtraynham over 8 years ago

Lodash 4 is out and this release reflects those changes. On the browser, most of Lodash hasn't changed, but the node (modular) version has. Other than that, there have only been small optimizations to code since the last release.

lodash-joins - Fix bug with Babel 6 default exports

Published by mtraynham almost 9 years ago

Seems the folks on the Babel codebase have changed how default exports work. This release is a temporary patch fix for that.

For more information:
https://phabricator.babeljs.io/T2212
https://www.npmjs.com/package/babel-plugin-add-module-exports

lodash-joins - Upgrade to Babel 6

Published by mtraynham almost 9 years ago

Changes:

Upgrade to Babel 6.

Features:

lodash-joins - Use lodash modules

Published by mtraynham over 9 years ago

This release moves to a modular lodash structure. This should improve load times with module loaders when requiring the join implementations directly. If you require the base module of this library, it will use the full lodash module because it re-exports every join function as mixins.

If you wish to use you're own lodash custom build, it can be generated with:

lodash modern include=flatten,every,filter,groupBy,indexBy,map,reduce,reduceRight,some,sortBy,isUndefined,assign,has,values
lodash-joins - Nested Loop/Hash Performance, Cleanup and Test Maintenance

Published by mtraynham over 9 years ago

Changes

  • Slight performance increases in Nested Loop and Hash joins by using the smaller array as the parent.
  • Changed tests to use the correct assert functions from Chai.
  • Improve Webpack specs and made them more maintainable.
  • Added a clean way to generated the license banner.
  • Everything is now ES6, even the Gulp file.
lodash-joins - ES6 Migration

Published by mtraynham over 9 years ago

This release migrates all code to ES6, using babel. Everything should still work the same, minus the ability to require functions independently by path within node (which is not encouraged). If you need to do that, see the README note.

Other changes include:

  • Browser testing
  • Refactored gulp tasks
lodash-joins - Fix source maps and update dependencies

Published by mtraynham over 9 years ago

lodash-joins - Added joinWrapper and moved to Webpack

Published by mtraynham over 9 years ago

Join Wrapper

The join wrapper handles missing input values. The first two parameters (the left array and the left accessor) are required. An error will be thrown if they are missing. The right array and right accessor are now optional. This allows one to define self-joins fairly easily.

_.hashLeftOuterJoin([{id: 'a'}], function (d) { return d['id']; });

or

_([{id: 'a'}]).hashLeftOuterJoin(function (d) { return d['id']; }).value();
Switched to Webpack

Webpack offers quite a few advantages of Browserify. Just to mention one, the amount of dev dependencies this library requires was reduced by 1/3.

lodash-joins - Dependency updates and changes to source map distribution

Published by mtraynham over 9 years ago

  • Changes the lodash dependency to match any minor version of lodash 3.X instead of the 3.2.X patch versions.
  • Using exorcist to externalize the source mapping generated by browserify.
  • Removed the gulp release task as the bower distribution will always have source maps now.
lodash-joins - Dependency updates

Published by mtraynham over 9 years ago

Upgrade lodash to 3.2.0. Moved all feature work to a separate branch.

lodash-joins - Bower fix and dependency updates

Published by mtraynham almost 10 years ago

  • Fixes #3
  • Updates to bower ignore
  • Updates to npm deps