11 lines
273 B
XML
11 lines
273 B
XML
function extractLastFourDigits(text) {
|
|
if (text&&text.indexOf('1') !== -1 && text.length >= 11) {
|
|
var lastFourDigits = text.slice(-4);
|
|
return lastFourDigits;
|
|
} else {
|
|
return "****";
|
|
}
|
|
}
|
|
module.exports = {
|
|
extractLastFourDigits: extractLastFourDigits,
|
|
}; |