You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
7 months ago | |
|---|---|---|
| .. | ||
| .gitattributes | 7 months ago | |
| .travis.yml | 7 months ago | |
| LICENSE | 7 months ago | |
| README.md | 7 months ago | |
| index.js | 7 months ago | |
| package.json | 7 months ago | |
| test.js | 7 months ago | |
README.md
fn.name
Extract the name of a given function. Nothing more than that.
Installation
This module is compatible with Browserify and Node.js and can be installed using:
npm install --save fn.name
Usage
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!
License
MIT