diff --git a/README.md b/README.md index 1931813b8..ccaf12894 100644 --- a/README.md +++ b/README.md @@ -5391,6 +5391,8 @@ UUIDGeneratorNode(); // '79c7c136-60ee-40a2-beb2-856f1feabefc' ### bindAll +Binds methods of an object to the object itself, overwriting the existing method. + Use `Array.forEach()` to return a `function` that uses `Function.apply()` to apply the given context (`obj`) to `fn` for each function specified. ```js diff --git a/docs/index.html b/docs/index.html index 1282dc6f3..e330a0308 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1232,7 +1232,7 @@ console.log< (c ^ (crypto.randomBytes(1)[0] & (15 >> (c / 4)))).toString(16) );
UUIDGeneratorNode(); // '79c7c136-60ee-40a2-beb2-856f1feabefc'
-

Object

bindAll

Use Array.forEach() to return a function that uses Function.apply() to apply the given context (obj) to fn for each function specified.

const bindAll = (obj, ...fns) =>
+

Object

bindAll

Binds methods of an object to the object itself, overwriting the existing method.

Use Array.forEach() to return a function that uses Function.apply() to apply the given context (obj) to fn for each function specified.

const bindAll = (obj, ...fns) =>
   fns.forEach(
     fn => (
       (f = obj[fn]),