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

Function getIds

popup/helpers/storageScripts.js:6–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5const createScriptsSaver = (key, addToHead = true) => {
6 const getIds = () =>
7 JSON.parse(localStorage.getItem(key) ?? "[]").filter(
8 (savedScriptId) => savedScriptId in metadata
9 );
10 const has = (script) => {
11 let current = getIds();
12 let exist = current.findIndex((id) => id === script.id) >= 0;

Callers 4

hasFunction · 0.85
addFunction · 0.85
removeFunction · 0.85
getFunction · 0.85

Calls 2

filterMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected