server/node_modules/prisma-datamodel/dist/util/util.js
/**
 * Removes all indent from a multi-line string literal.
 * The indent is the smalles indent off all non-empty lines.
 * If the first line is empty, it is removed.
 * @param literal
 */
Removes all indent from a multi-line string literal.
The indent is the smalles indent off all non-empty lines.
If the first line is empty, it is removed.
@param literal
Removes all indent from a multi - line string literal . The indent is the smalles indent off all non - empty lines . If the first line is empty it is removed . @param literal
function dedent(literal) {
    var lines = literal.split('\n');
    if (lines.length === 0) {
        return '';
    }
    if (lines[0].length === 0) {
        lines.splice(0, 1);
    }
    var indent = -1;
    for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
        var line = lines_1[_i];
        var trimmed = line.trimLeft();
        if (trimmed.length === 0) {
            continue;
        }
        var lineIndent = line.indexOf(trimmed);
        if (indent === -1) {
            indent = lineIndent;
        }
        else {
            indent = Math.min(lineIndent, indent);
        }
    }
    for (var i = 0; i < lines.length; i++) {
        if (lines[i].length < indent) {
            lines[i] = ''; 
        }
        else {
            lines[i] = lines[i].substring(indent);
        }
    }
    return lines.join('\n');
}
function dedent ( literal ) { var lines = literal . split ( '\n' ) ; if ( lines . length === 0 ) { return '' ; } if ( lines [ 0 ] . length === 0 ) { lines . splice ( 0 , 1 ) ; } var indent = - 1 ; for ( var _i = 0 , lines_1 = lines ; _i < lines_1 . length ; _i ++ ) { var line = lines_1 [ _i ] ; var trimmed = line . trimLeft ( ) ; if ( trimmed . length === 0 ) { continue ; } var lineIndent = line . indexOf ( trimmed ) ; if ( indent === - 1 ) { indent = lineIndent ; } else { indent = Math . min ( lineIndent , indent ) ; } } for ( var i = 0 ; i < lines . length ; i ++ ) { if ( lines [ i ] . length < indent ) { lines [ i ] = '' ; } else { lines [ i ] = lines [ i ] . substring ( indent ) ; } } return lines . join ( '\n' ) ; }
Removes all indent from a multi-line string literal.
Removes all indent from a multi - line string literal .
// Find minimum indent // Dedent document // Line containing only whitespace or empty.