MCPcopy
hub / github.com/ardatan/graphql-tools / join

Function join

packages/utils/src/comments.ts:109–111  ·  view source on GitHub ↗

* Given maybeArray, print an empty string if it is null or empty, otherwise * print all items together separated by separator if provided

(maybeArray?: readonly any[], separator?: string)

Source from the content-addressed store, hash-verified

107 * print all items together separated by separator if provided
108 */
109function join(maybeArray?: readonly any[], separator?: string) {
110 return maybeArray ? maybeArray.filter(x => x).join(separator || '') : '';
111}
112
113function hasMultilineItems(maybeArray: Maybe<ReadonlyArray<string>>): boolean {
114 return maybeArray?.some(str => str.includes('\n')) ?? false;

Callers 15

addDescriptionFunction · 0.85
blockFunction · 0.85
comments.tsFile · 0.85
leaveFunction · 0.85
processImportFunction · 0.85
resolveFilePathFunction · 0.85
getPointerFunction · 0.85
getPointerFunction · 0.85
loader.spec.tsFile · 0.85
getPointerFunction · 0.85

Calls 1

filterMethod · 0.80

Tested by 3

getPointerFunction · 0.68
getPointerFunction · 0.68
getPointerFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…