MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / stringList

Function stringList

src/lib/stringList.js:19–35  ·  view source on GitHub ↗
(strings, endDelineator = 'and')

Source from the content-addressed store, hash-verified

17 * @return {String} human - friendly list
18 */
19export default function stringList(strings, endDelineator = 'and') {
20 const progress = [];
21 strings.forEach((s, i) => {
22 if (i > 0) {
23 if (i === strings.length - 1) {
24 if (progress.length > 1) {
25 progress.push(',');
26 }
27 progress.push(` ${endDelineator} `);
28 } else {
29 progress.push(', ');
30 }
31 }
32 progress.push(s);
33 });
34 return progress.join('');
35}

Callers 2

renderMethod · 0.85
PushUtils.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected