MCPcopy Create free account
hub / github.com/NativeScript/android / IsESModule

Method IsESModule

test-app/runtime/src/main/cpp/ModuleInternal.cpp:48–51  ·  view source on GitHub ↗

Helper function to check if a file path is an ES module (.mjs) but not a source map (.mjs.map)

Source from the content-addressed store, hash-verified

46
47// Helper function to check if a file path is an ES module (.mjs) but not a source map (.mjs.map)
48bool ModuleInternal::IsESModule(const std::string& path) {
49 return path.size() >= 4 && path.compare(path.size() - 4, 4, ".mjs") == 0 &&
50 !(path.size() >= 8 && path.compare(path.size() - 8, 8, ".mjs.map") == 0);
51}
52
53ModuleInternal::ModuleInternal()
54 : m_isolate(nullptr), m_requireFunction(nullptr), m_requireFactoryFunction(nullptr) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected