This commit add the definition for the a very simple, and yet essential, isNil
function for type checking. This function is particularly useful in a consume
handler.
Example:
```
source.consume(function (err, x, push, next) {
if (err) {
// pass errors along the stream and consume next value
push(err);
next();
} else if (_.isNil(x)) { // type guard is only possible with this function
// pass nil (end event) along the stream
push(null, x);
} else {
// pass on the value only if the value passes the predicate
if (f(x)) {
push(null, x);
}
next();
}
});
```
See https://github.com/caolan/highland/pull/645
* lodash: _.get should with numeric keys, too.
Also added some better tests.
* lodash: add one more NumericDictionary overload for _.get
* lodash: more reasonable index for _.get tests
* Working on script to generate FP types (for #7896)
* Generate generic args and multiple overloads correctly (ish)
* Cap callback arguments
* Fix ObjectIteratee issue, merge interfaces
* Merge similar overloads
* Read and write definiton files
* Generate definitions for all functions
(still needs some tweaking)
* Add JSDoc comments to the output, fix some bugs
* Fix more fp generation bugs
* Add alias functions and special fp functions
* Fix more fp generation bugs
* Fix more fp generation bugs
* Fix more fp generation bugs
* lodash fp: cap more callbacks, use ReadonlyArray, handle special cases
* Add some tests, fix some bugs
* Remove invalid argument from flatten. Don't curry single argument functions.
But do "convert" them so aliases work.
Also fixed some tests.
* lodash fp: implement more tests, fix more bugs, improve performance
* lodash fp: implement more tests, fix more bugs
* lodash fp: add more tests, fix more bugs
* lodash fp: tests finally pass!
* Remove namespace hack
* lodash: fix tests
* lodash fp: fix lint issues
* lodash: Fix lint issues
* lodash: fix more lint issues
* lodash: make travis happy
* lodash: make travis happy (again)
* Update generate-fp script to work with new folder structure
* Lodash: update fp types after merge
* Lodash: test optimizations
* lodash: simplify some tests to avoid GC error
* lodash: simplify tests even more (and fix bugs)