(script)
| 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 |