100 karma · joined January 17, 2011
As for package.json, yes there may occasionally be conflicts with NPM, but in many cases they should be compatible since they are based on the same spec. Perhaps allowing you to override with "jam.json" would be a good idea for times when they would conflict?
This library was created because I often include both async and underscore in client-side projects, which seems a bit overkill when every kb matters.
I've also looked into combining the features of async with underscore in the past. However, I don't believe its possible without backward incompatible changes, or a separate API (one for sync one for async). Nimble is an experiment in how a combined API might work, and uses some interesting tricks regarding function arity to support something closer to the standard map/filter/reduce, while still being convenient to use with callbacks.
For example, you can do the following:
_.map(arr, function (val, callback) { ... }, main_callback);
but you can also do this:
_.map(arr, function (val, key, arr, callback) { ... }, main_callback);
And it will still work as expected.
This seemed like overkill, so I've made a tiny build with just the essentials from each library, and a new unified API. Perhaps some HN members will find this useful?