@immomio/api-library
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -10,13 +10,10 @@ export declare type MessageCategory = string; | ||
export declare const getMessageCodeNumber: (msgCode: string) => string; | ||
declare const _default: { | ||
decode: (msgCode: any) => false | { | ||
category: string; | ||
info: { | ||
body: string; | ||
title: string; | ||
}; | ||
message: string; | ||
type: "error" | "success"; | ||
export declare const decode: (msgCode: any) => false | { | ||
category: string; | ||
info: { | ||
body: string; | ||
title: string; | ||
}; | ||
message: string; | ||
type: "error" | "success"; | ||
}; | ||
export default _default; |
@@ -21,21 +21,19 @@ "use strict"; | ||
}; | ||
exports.default = { | ||
decode: function (msgCode) { | ||
if (!exports.isValidMessageCode(msgCode)) | ||
return false; | ||
var type = exports.getMessageCodeType(msgCode); | ||
var category = exports.getMessageCodeCategory(msgCode); | ||
var message = exports.getMessageCodeNumber(msgCode); | ||
var info = { | ||
body: "messagecodes." + category + "." + message + "." + type, | ||
title: "messagecodes." + category, | ||
}; | ||
return { | ||
category: category, | ||
info: info, | ||
message: message, | ||
type: type, | ||
}; | ||
}, | ||
exports.decode = function (msgCode) { | ||
if (!exports.isValidMessageCode(msgCode)) | ||
return false; | ||
var type = exports.getMessageCodeType(msgCode); | ||
var category = exports.getMessageCodeCategory(msgCode); | ||
var message = exports.getMessageCodeNumber(msgCode); | ||
var info = { | ||
body: "messagecodes." + category + "." + message + "." + type, | ||
title: "messagecodes." + category, | ||
}; | ||
return { | ||
category: category, | ||
info: info, | ||
message: message, | ||
type: type, | ||
}; | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@immomio/api-library", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Immomio library to access the immomio-API", | ||
@@ -5,0 +5,0 @@ "engineStrict": true, |
@@ -28,20 +28,18 @@ | ||
export default { | ||
decode: (msgCode: any) => { | ||
if (!isValidMessageCode(msgCode)) | ||
return false | ||
const type = getMessageCodeType(msgCode) | ||
const category = getMessageCodeCategory(msgCode) | ||
const message = getMessageCodeNumber(msgCode) | ||
const info = { | ||
body: `messagecodes.${category}.${message}.${type}`, | ||
title: `messagecodes.${category}`, | ||
} | ||
return { | ||
category, | ||
info, | ||
message, | ||
type, | ||
} | ||
}, | ||
export const decode = (msgCode: any) => { | ||
if (!isValidMessageCode(msgCode)) | ||
return false | ||
const type = getMessageCodeType(msgCode) | ||
const category = getMessageCodeCategory(msgCode) | ||
const message = getMessageCodeNumber(msgCode) | ||
const info = { | ||
body: `messagecodes.${category}.${message}.${type}`, | ||
title: `messagecodes.${category}`, | ||
} | ||
return { | ||
category, | ||
info, | ||
message, | ||
type, | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49517
953