MCPcopy
hub / github.com/ampproject/amphtml / getChannels

Function getChannels

build-system/status-page/common.js:47–56  ·  view source on GitHub ↗

* Get channels from Channels section * status.amp.dev only cares about Stable and LTS, so ignore other channels * @param {string} body * @return {Array }

(body)

Source from the content-addressed store, hash-verified

45 * @return {Array<string>}
46 */
47function getChannels(body) {
48 const text = getInnerText(body, 'Channels');
49 const channels = [];
50 for (const channel of ['Stable', 'LTS']) {
51 if (text.includes(channel)) {
52 channels.push(channel);
53 }
54 }
55 return channels;
56}
57
58/**
59 * Gets formats from Formats section

Callers 2

syncIncidentFunction · 0.85
addCommentFunction · 0.85

Calls 2

getInnerTextFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected