刘琳琳 97c35fdf0d 航汇HHArome小程序容器演示 | il y a 2 mois | |
---|---|---|
.. | ||
.gitattributes | il y a 2 mois | |
.travis.yml | il y a 2 mois | |
LICENSE | il y a 2 mois | |
README.md | il y a 2 mois | |
index.js | il y a 2 mois | |
package.json | il y a 2 mois | |
test.js | il y a 2 mois |
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