Skip to content

Instantly share code, notes, and snippets.

@wryk
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wryk/07a4325a8fcc23b47207 to your computer and use it in GitHub Desktop.
Save wryk/07a4325a8fcc23b47207 to your computer and use it in GitHub Desktop.
export default getFunctionSignature
import getFunctionArguments from 'get-function-arguments'
/**
* @param {Function} fn
* @return {String}
**/
function getFunctionSignature (fn) {
var name = fn.name || ''
var args = getFunctionArguments(fn).join(', ')
return 'function ' + name + '(' + args + ')'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment