(app)
| 77 | const unifiedEnv = parseUnifiedEnv(); |
| 78 | |
| 79 | function getAccounts(app) { |
| 80 | const keys = [app.ck, app.appid, app.name].map((item) => item.toLowerCase()); |
| 81 | const accounts = []; |
| 82 | if (unifiedEnv.global.length) accounts.push(...unifiedEnv.global); |
| 83 | for (const key of keys) accounts.push(...(unifiedEnv.byKey[key] || [])); |
| 84 | accounts.push(...splitAccounts(process.env[app.ck] || "")); |
| 85 | return unique(accounts); |
| 86 | } |
| 87 | |
| 88 | function maskPhone(phone = "") { |
| 89 | return String(phone).replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2"); |
no test coverage detected