summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/function/#/to-string-tokens.js
blob: 67afeae82def7e37788b095f446a9a192fe19612 (plain)
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] };
};