MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / has

Function has

popup/helpers/storageScripts.js:10–14  ·  view source on GitHub ↗
(script)

Source from the content-addressed store, hash-verified

8 (savedScriptId) => savedScriptId in metadata
9 );
10 const has = (script) => {
11 let current = getIds();
12 let exist = current.findIndex((id) => id === script.id) >= 0;
13 return exist;
14 };
15 const add = (script) => {
16 let current = getIds();
17 let newList = current.filter((id) => id != script.id); // remove duplicate

Callers 1

toggleFunction · 0.70

Calls 1

getIdsFunction · 0.85

Tested by

no test coverage detected