(value = "")
| 63 | } |
| 64 | |
| 65 | function mask(value = "") { |
| 66 | value = String(value || ""); |
| 67 | if (!value) return ""; |
| 68 | if (value.length <= 12) return `${value.slice(0, 3)}***`; |
| 69 | return `${value.slice(0, 6)}***${value.slice(-6)}`; |
| 70 | } |
| 71 | |
| 72 | function sha1(text) { |
| 73 | return crypto.createHash("sha1").update(String(text)).digest("hex"); |
no outgoing calls
no test coverage detected