UNPKG

ts-budgie

Version:

Converts TypeScript code to Budgie.

18 lines 562 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Converts text for a string to Budgie-compatible quotes. * * @param text Text that needs to be quote-wrapped. * @returns Budgie-compatible quote-wrapped version of the text. */ exports.wrapWithQuotes = function (text) { if (text[0] === '"') { return text; } if (text[0] === "'" || text[0] === "`") { return "\"" + text.slice(1, text.length - 2) + "\""; } return "\"" + text + "\""; }; //# sourceMappingURL=strings.js.map