import { DiagnosticSeverity } from "vscode-languageserver/node";
import { Position } from "vscode-languageserver/node";
export function camelize(value) {
    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());
}
export function dasherize(value) {
    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);
}
export function capitalize(value) {
    return value.charAt(0).toUpperCase() + value.slice(1);
}
export function lintToDignosticSeverity(severity) {
    switch (severity) {
        case "error": return DiagnosticSeverity.Error;
        case "warning": return DiagnosticSeverity.Warning;
        case "info": return DiagnosticSeverity.Information;
        case "hint": return DiagnosticSeverity.Hint;
    }
}
/**
 * Returns a Range that spans the entire document
 */
export function getFullDocumentRange(document) {
    const lastLine = document.lineCount - 1;
    const lastLineText = document.getText({
        start: Position.create(lastLine, 0),
        end: Position.create(lastLine + 1, 0)
    });
    const lastLineLength = lastLineText.length;
    return {
        start: Position.create(0, 0),
        end: Position.create(lastLine, lastLineLength)
    };
}
//# sourceMappingURL=utils.js.map