MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / get

Method get

src/app/script/api/storage_script.cpp:71–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 script::Value get(const std::string& key, const std::string& domain) {
72 auto domainIt = storage.find(domain.empty() ? app::AppScripting::getFileName() : domain);
73 if (domainIt == storage.end()) return {};
74 auto entryIt = domainIt->second.find(key);
75 if (entryIt == domainIt->second.end()) return {};
76 return entryIt->second;
77 }
78
79 void set(const script::Value& value, const std::string& key, const std::string& domain) {
80 storage[domain.empty() ? app::AppScripting::getFileName() : domain][key] = value;

Callers 2

loadMethod · 0.45
saveMethod · 0.45

Calls 2

emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected