@hv-kit/hexpress
Version:
facilitates typescript backend development with express
22 lines • 761 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLang = exports.getBody = void 0;
const config_1 = require("./config");
const getBody = (body, files = {}) => {
files = (typeof files === 'object' &&
Array.isArray(files) === false) ? files : {};
body = (typeof body === 'object' &&
Array.isArray(body) === false) ? body : {};
return (!!files &&
Object.keys(files).length > 0) ? files : body;
};
exports.getBody = getBody;
const getLang = (lang) => {
return (config_1.langs.includes(lang)) ? lang : config_1.langs[0];
};
exports.getLang = getLang;
exports.default = {
getBody: exports.getBody,
getLang: exports.getLang,
};
//# sourceMappingURL=other.js.map