UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

20 lines 804 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isStringParam = void 0; const dictionary_1 = require("../errors/dictionary"); const constants_1 = require("../constants"); function isStringParam(param, dataType) { const valid = dataType === constants_1.AST_PRIMITIVES.STRING || (dataType === undefined && typeof param === constants_1.AST_PRIMITIVES.STRING); const baseResponse = { valid, mismatchData: { primitive: constants_1.AST_PRIMITIVES.STRING, }, }; if (!valid) return Object.assign(Object.assign({}, baseResponse), dictionary_1.ERROR_DICTIONARY[dictionary_1.ERROR_LIST.missingString]); return baseResponse; } exports.isStringParam = isStringParam; //# sourceMappingURL=isStringParam.js.map