mirror of https://github.com/lukechilds/node.git
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.
12 lines
317 B
12 lines
317 B
10 years ago
|
'use strict';
|
||
|
|
||
|
var validFunction = require('../valid-function')
|
||
|
|
||
|
, re = new RegExp('^\\s*function[\\0-\'\\)-\\uffff]*' +
|
||
|
'\\(([\\0-\\(\\*-\\uffff]*)\\)\\s*\\{([\\0-\\uffff]*)\\}\\s*$');
|
||
|
|
||
|
module.exports = function () {
|
||
|
var data = String(validFunction(this)).match(re);
|
||
|
return { args: data[1], body: data[2] };
|
||
|
};
|