MCPcopy Create free account
hub / github.com/ClydeTime/Surge / compact

Function compact

Script/Task/nga.js:209–221  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

207 });
208
209 function compact(array) {
210 let resIndex = 0;
211 const result = [];
212 if (array == null) {
213 return result;
214 }
215 for (const value of array) {
216 if (value) {
217 result[resIndex++] = value;
218 }
219 }
220 return result;
221 }
222
223 const result = {};
224 array.forEach((a) => {

Callers 1

FormDataToObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected