corebasic 1.0.163 → 1.0.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/utils.js +4 -0
- package/package.json +1 -1
package/libs/utils.js
CHANGED
|
@@ -32,6 +32,8 @@ export function isEmpty(str) { // returns true for undefined
|
|
|
32
32
|
return str.match(/\S/) ? false : true // matches a non space character
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
export let GLOBAL_META = { company: "GLOBAL", outlet: "GLOBAL" }
|
|
36
|
+
|
|
35
37
|
export function isEmptyJson(json) {
|
|
36
38
|
for (var i in json)
|
|
37
39
|
return false
|
|
@@ -237,6 +239,8 @@ export function parseMob(mob, code) {
|
|
|
237
239
|
code = code ?? "IN"
|
|
238
240
|
if (isEmpty(mob))
|
|
239
241
|
return mob
|
|
242
|
+
if (mob.startsWith("MOB_"))
|
|
243
|
+
return mob
|
|
240
244
|
mob = mob.trim().replace(/(,| |-|\+)/g, '') // remove comma, space, hyphen and plus
|
|
241
245
|
mob = mob.startsWith("0") ? mob.replace(/^0*/,'') : mob // remove starting n zeroes
|
|
242
246
|
|