bluegate.js
function(fn) {
  var code = fn.toString();
  var match = code.match(/^(?:(?:function)?[\s]*\(([^)]*)\)|([^\=\(]+))/);
  var args = (match[1] || match[2]);
  if (typeof args === 'undefined') {
    return [];
  }
  return args.split(',').map(function(item) {
    return item.trim();
  }).filter(function(item) {
    return item;
  });
}
function(fn) {
  var code = fn.toString();
  var match = code.match(/^(?:(?:function)?[\s]*\(([^)]*)\)|([^\=\(]+))/);
  var args = (match[1] || match[2]);
  if (typeof args === 'undefined') {
    return [];
  }
  return args.split(',').map(function(item) {
    return item.trim();
  }).filter(function(item) {
    return item;
  });
}
function ( fn ) { var code = fn . toString ( ) ; var match = code . match ( / ^(?:(?:function)?[\s]*\(([^)]*)\)|([^\=\(]+)) / ) ; var args = ( match [ 1 ] || match [ 2 ] ) ; if ( typeof args === 'undefined' ) { return [ ] ; } return args . split ( ',' ) . map ( function ( item ) { return item . trim ( ) ; } ) . filter ( function ( item ) { return item ; } ) ; }
List function arguments.
List function arguments .