MCPcopy Create free account
hub / github.com/6dylan6/jdm / compact

Method compact

function/common.js:249–257  ·  view source on GitHub ↗
(lists, keys)

Source from the content-addressed store, hash-verified

247 return return_array;
248 }
249 compact(lists, keys) {
250 let array = {};
251 for (let i of keys) {
252 if (lists[i]) {
253 array[i] = lists[i];
254 }
255 }
256 return array;
257 }
258 unique(arr) {
259 return Array.from(new Set(arr));
260 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected