Tag and build
This commit is contained in:
12
README.md
12
README.md
@ -63,6 +63,7 @@
|
||||
* [Chain asynchronous functions](#chain-asynchronous-functions)
|
||||
* [Compose functions](#compose-functions)
|
||||
* [Curry](#curry)
|
||||
* [Log function name](#log-function-name)
|
||||
* [Pipe functions](#pipe-functions)
|
||||
* [Promisify](#promisify)
|
||||
* [Run promises in series](#run-promises-in-series)
|
||||
@ -743,6 +744,17 @@ const curry = (fn, arity = fn.length, ...args) =>
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
### Log function name
|
||||
|
||||
Use `console.debug()` and the `name` property of the passed method to log the method's name to the `debug` channel of the console.
|
||||
|
||||
```js
|
||||
const functionName = fn => (console.debug(fn.name), fn);
|
||||
// functionName(Math.max) -> max (logged in debug channel of console)
|
||||
```
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
### Pipe functions
|
||||
|
||||
Use `Array.reduce()` with the spread operator (`...`) to perform left-to-right function composition.
|
||||
|
||||
Reference in New Issue
Block a user