UNPKG

css-to-ts

Version:

css-to-ts takes a css file and outputs a TypeScript file with an exported string containing a content of your css file.

13 lines (12 loc) 510 B
Object.defineProperty(exports, "__esModule", { value: true }); const contracts_1 = require("./contracts"); function IsVarNameValid(varName) { const startsWithNumberRegex = new RegExp("^[0-9]", "ig"); return (varName.length > 0 && !startsWithNumberRegex.test(varName)); } exports.IsVarNameValid = IsVarNameValid; function IsVarTypeValid(varType) { const values = Object.values(contracts_1.VarType); return (values.indexOf(varType) !== -1); } exports.IsVarTypeValid = IsVarTypeValid;