MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getInlineScriptSyntaxError

Function getInlineScriptSyntaxError

packages/lint/src/utils.ts:207–217  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

205}
206
207export function getInlineScriptSyntaxError(source: string): string | null {
208 if (!source.trim()) return null;
209 try {
210 // eslint-disable-next-line no-new-func
211 new Function(source);
212 return null;
213 } catch (error) {
214 if (error instanceof Error) return error.message;
215 return String(error);
216 }
217}
218
219// fallow-ignore-next-line complexity
220export function stripJsComments(source: string): string {

Callers 1

core.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected