node_modules.apollo-codegen.lib.utilities.printing.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-client-maven-plugin Show documentation
Show all versions of apollo-client-maven-plugin Show documentation
Maven plugin for generating graphql clients
The newest version!
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function join(maybeArray, separator) {
return maybeArray ? maybeArray.filter(x => x).join(separator || '') : '';
}
exports.join = join;
function block(array) {
return array && array.length !== 0 ?
indent('{\n' + join(array, '\n')) + '\n}' :
'{}';
}
exports.block = block;
function wrap(start, maybeString, end) {
return maybeString ?
start + maybeString + (end || '') :
'';
}
exports.wrap = wrap;
function indent(maybeString) {
return maybeString && maybeString.replace(/\n/g, '\n ');
}
exports.indent = indent;
//# sourceMappingURL=printing.js.map