MCPcopy Index your code
hub / github.com/react/react / parseAndEval

Function parseAndEval

scripts/shared/__tests__/evalToString-test.js:14–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12const parse = source => parser.parse(`(${source});`).program.body[0].expression; // quick way to get an exp node
13
14const parseAndEval = source => evalStringConcat(parse(source));
15
16describe('evalToString', () => {
17 it('should support StringLiteral', () => {

Callers 1

Calls 2

evalStringConcatFunction · 0.85
parseFunction · 0.70

Tested by

no test coverage detected