All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.apollo-codegen.lib.utilities.printing.js Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy