UNPKG

@making-sense/antlr-editor

Version:
16 lines 676 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.uriFromPath = void 0; const path_browserify_1 = __importDefault(require("path-browserify")); function ensureFirstBackSlash(str) { return str.length > 0 && str.charAt(0) !== "/" ? "/" + str : str; } function uriFromPath(_path) { const pathName = path_browserify_1.default.resolve(_path).replace(/\\/g, "/"); return encodeURI("file://" + ensureFirstBackSlash(pathName)); } exports.uriFromPath = uriFromPath; //# sourceMappingURL=monaco.js.map