MCPcopy Create free account
hub / github.com/buke/quickjs-go / mayContainModuleSyntax

Function mayContainModuleSyntax

context.go:70–74  ·  view source on GitHub ↗
(code string)

Source from the content-addressed store, hash-verified

68)
69
70func mayContainModuleSyntax(code string) bool {
71 return strings.Contains(code, "import") ||
72 strings.Contains(code, "export") ||
73 strings.Contains(code, "await")
74}
75
76func zeroTerminatedBytes(s string) []byte {
77 b := make([]byte, len(s)+1)

Callers 1

detectModuleSourceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected