Skip to content

Commit

Permalink
Merge pull request Chalarangelo#132 from b117020/master
Browse files Browse the repository at this point in the history
method name
  • Loading branch information
Chalarangelo authored Dec 16, 2017
2 parents ce58ba6 + c75deef commit c1ef91c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions snippets/log-method-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Log method 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 methodName = fn => (console.debug(fn.name), fn);
// methodName(methodName) -> methodName (logged in debug channel of console)
```

0 comments on commit c1ef91c

Please sign in to comment.