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

Function parseAndGetObjectProperty

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

Source from the content-addressed store, hash-verified

39}
40
41export function parseAndGetObjectProperty(code: string): Object {
42 let parser = new Parser();
43 let program = parser.parse(`({${code}})`);
44 return program.body[0].expression.properties[0];
45}
46
47export function parseAndGetObjectPropertyDefaultValue(code: string): Object {
48 let parser = new Parser();

Callers 5

Token.jsFile · 0.90
NumericLiteral.jsFile · 0.90
SpreadProperty.jsFile · 0.90
ObjectMethod.jsFile · 0.90
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…