Files
30-seconds-of-code/snippets/pipeLog.md
Filipe Dos Santos Mendes 85b1602f02 Create pipeLog.md
2018-08-20 14:32:35 +02:00

14 lines
253 B
Markdown

### pipeLog
Use `console.log` in a pipeline as this function simply encloses it and returns the passed value.
Logs a value and returns it.
```js
const pipeLog = data => console.log(data) || data
```
```js
pipeLog(1); // logs `1` and returns `1`
```