1
0

to-string-tokens.js 317 B

1234567891011
  1. 'use strict';
  2. var validFunction = require('../valid-function')
  3. , re = new RegExp('^\\s*function[\\0-\'\\)-\\uffff]*' +
  4. '\\(([\\0-\\(\\*-\\uffff]*)\\)\\s*\\{([\\0-\\uffff]*)\\}\\s*$');
  5. module.exports = function () {
  6. var data = String(validFunction(this)).match(re);
  7. return { args: data[1], body: data[2] };
  8. };