MCPcopy
hub / github.com/webpack/webpack-dev-server / sortByTerm

Function sortByTerm

test/e2e/target.test.js:20–21  ·  view source on GitHub ↗
(data, term)

Source from the content-addressed store, hash-verified

18const port = portsMap.target;
19
20const sortByTerm = (data, term) =>
21 data.toSorted((a, b) => (a.indexOf(term) < b.indexOf(term) ? -1 : 1));
22
23// `"universal"` and combined `["web", "node"]` targets emit ESM and are only
24// available since webpack `5.108.0`, but `peerDependencies` allows `^5.101.0`.

Callers 1

target.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…