MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getAllJsPaths

Method getAllJsPaths

valdi/src/valdi/runtime/Resources/Bundle.cpp:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199std::vector<StringBox> Bundle::getAllJsPaths() {
200 std::lock_guard<std::recursive_mutex> guard(_mutex);
201 lockFreeLoadEntriesIfNeeded();
202
203 std::vector<StringBox> output;
204 for (const auto& entryPath : _allEntryPaths) {
205 if (entryPath.hasSuffix(".js")) {
206 auto withoutExtension = entryPath.substring(0, entryPath.length() - 3);
207 output.emplace_back(withoutExtension);
208 }
209 }
210
211 return output;
212}
213
214void Bundle::setJs(const StringBox& jsPath, const JavaScriptFile& jsFile) {
215 std::lock_guard<std::recursive_mutex> guard(_mutex);

Callers 1

Calls 3

hasSuffixMethod · 0.80
substringMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected