But there’s more: new function bind syntax performs function binding and method extraction. The previous example could be rewritten as:
ES6 also introduces the concept of iterators - protocol, that most JS collection types implement. You can extend your custom collections to support the same protocol, and generators functions support it too. So, if you looking for utility library that supports new function bind syntax, and iterators, you can take a look on Trine.
First of all, you may want to use all features of ES6 and most of ES7 standards with Babel:
Then install Trine:
and import to your project required functions:
Trine provides common boolean helpers:
Extract , compare or convert values to functions:
Trine includes partial helper:
If you like new syntax of ES6, ES7 and want to use iterators, function binding, you can use Trine as base utility library. If you want to know more about Trine, you can take a look at it’s documentation .