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

Function parseAndGetObjectPropertyDefaultValue

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

Source from the content-addressed store, hash-verified

45}
46
47export function parseAndGetObjectPropertyDefaultValue(code: string): Object {
48 let parser = new Parser();
49 let program = parser.parse(`({${code}} = {})`);
50
51 return program.body[0].expression.left.properties[0];
52}
53
54export function parseAndGetClassMember(code: string): Object {
55 let parser = new Parser();

Callers 1

ObjectProperty.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…