openapi-ts-json-schema
Version:
OpenAPI to JSON schema generator with TypeScript in mind
18 lines (17 loc) • 566 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.filenamify = void 0;
const filenamify_1 = __importDefault(require("filenamify"));
/**
* Replace "/" occurrences with "_"
* and any other file path unsafe character with "!"
*/
function filenamify(name) {
return (0, filenamify_1.default)(name.replaceAll('/', '_'), {
replacement: '!',
});
}
exports.filenamify = filenamify;