MCPcopy Create free account
hub / github.com/cst/cst / parseAndGetExpressionInFunction

Function parseAndGetExpressionInFunction

test/utils.js:29–33  ·  view source on GitHub ↗
(code: string, options: CSTParserOptions)

Source from the content-addressed store, hash-verified

27}
28
29export function parseAndGetExpressionInFunction(code: string, options: CSTParserOptions): Object {
30 let parser = new Parser(options);
31 let program = parser.parse(`(function(){( ${code} )})`);
32 return program.body[0].expression.body.body[0].expression;
33}
34
35export function parseAndGetPattern(code: string): Object {
36 let parser = new Parser();

Callers 1

MetaProperty.jsFile · 0.90

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…