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

Function parseAndGetClassMember

test/utils.js:54–58  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

52}
53
54export function parseAndGetClassMember(code: string): Object {
55 let parser = new Parser();
56 let program = parser.parse(`(class{${code}})`);
57 return program.body[0].expression.body.body[0];
58}
59
60export function parseAndGetObjectKey(code: string): Object {
61 let parser = new Parser();

Callers 2

ClassMethod.jsFile · 0.90
ClassProperty.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…