MCPcopy Create free account
hub / github.com/Tong89/smartNode / processRequests

Function processRequests

frontend/tests/app.unit.test.js:77–83  ·  view source on GitHub ↗

* Filter and sort requests: exclude background tasks, sort descending by id. * Mirrors app.js `computed.requests`.

(rawRequests)

Source from the content-addressed store, hash-verified

75 * Mirrors app.js `computed.requests`.
76 */
77function processRequests(rawRequests) {
78 const rows = Array.isArray(rawRequests) ? rawRequests : [];
79 return rows
80 .filter((req) => req.source !== 'background')
81 .slice()
82 .sort((a, b) => String(b.id || '').localeCompare(String(a.id || '')));
83}
84
85/**
86 * Transmission method → display string.

Callers 1

app.unit.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected