UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

27 lines (26 loc) 848 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Utilities_1 = __importDefault(require("../core/Utilities")); class ScriptGen { static getClassName(name) { if (name.length < 2) { return "untitled"; } name = name[0].toUpperCase() + name.substring(1, name.length); name = name.replace(/:/gi, ""); return name; } static getInstanceName(name) { if (name.length < 2) { return "untitled"; } name = Utilities_1.default.lowerCaseStartOfString(name); return name; } } exports.default = ScriptGen;