Merge remote-tracking branch 'origin/master'

This commit is contained in:
Angelos Chalaris
2018-01-28 16:41:25 +02:00
3 changed files with 13 additions and 7 deletions

View File

@ -5,10 +5,12 @@ Use `Array.forEach()` to return a `function` that uses `Function.apply()` to app
```js
const bindAll = (obj, ...fns) =>
fns.forEach(
fn =>
(f = obj[fn], obj[fn] = function() {
fn => (
(f = obj[fn]),
(obj[fn] = function() {
return f.apply(obj);
})
)
);
```