Blame view

node_modules/es5-ext/function/#/to-string-tokens.js 317 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
11
  '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] };
  };