* Checks if some provided code represents an object literal. * This is helpful to prevent confusing repl code evaluations where * strings such as `{ a : 1 }` would get interpreted as block statements * rather than object literals. * @param {string} code the code to check * @returns {boolean} tr
(code)
| 784 | * @returns {boolean} true if the code represents an object literal, false otherwise |
| 785 | */ |
| 786 | function isObjectLiteral(code) { |
| 787 | return RegExpPrototypeExec(startsWithBraceRegExp, code) !== null && |
| 788 | RegExpPrototypeExec(endsWithSemicolonRegExp, code) === null; |
| 789 | } |
| 790 | |
| 791 | const kContextId = Symbol('contextId'); |
| 792 |
no outgoing calls
no test coverage detected
searching dependent graphs…