MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / convert

Function convert

InteractiveHtmlBom/web/ibom.js:145–157  ·  view source on GitHub ↗
(ref)

Source from the content-addressed store, hash-verified

143
144function getStoredCheckboxRefs(checkbox) {
145 function convert(ref) {
146 var intref = parseInt(ref);
147 if (isNaN(intref)) {
148 for (var i = 0; i < pcbdata.footprints.length; i++) {
149 if (pcbdata.footprints[i].ref == ref) {
150 return i;
151 }
152 }
153 return -1;
154 } else {
155 return intref;
156 }
157 }
158 if (!(checkbox in settings.checkboxStoredRefs)) {
159 var val = readStorage("checkbox_" + checkbox);
160 settings.checkboxStoredRefs[checkbox] = val ? val : "";

Callers 1

getStoredCheckboxRefsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected