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

Function parseAndGetPattern

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

Source from the content-addressed store, hash-verified

33}
34
35export function parseAndGetPattern(code: string): Object {
36 let parser = new Parser();
37 let program = parser.parse(`(${code} = 1)`);
38 return program.body[0].expression.left;
39}
40
41export function parseAndGetObjectProperty(code: string): Object {
42 let parser = new Parser();

Callers 1

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