![]() |
vor 2 Monaten | |
---|---|---|
.. | ||
.gitattributes | vor 2 Monaten | |
.travis.yml | vor 2 Monaten | |
LICENSE | vor 2 Monaten | |
README.md | vor 2 Monaten | |
index.js | vor 2 Monaten | |
package.json | vor 2 Monaten | |
test.js | vor 2 Monaten |
Extract the name of a given function. Nothing more than that.
This module is compatible with Browserify and Node.js and can be installed using:
npm install --save fn.name
Using this module is super simple, it exposes the function directly on the exports so it can be required as followed:
'use strict';
var name = require('fn.name');
Now that we have the name
function we can pass it functions:
console.log(name(function foo() {})) // foo
And that's it folks!
MIT