Created
January 7, 2019 15:25
-
-
Save dmitrade/c04f8c54f9928eb7f65874fabecb6caa to your computer and use it in GitHub Desktop.
Masking all symbols but last 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function maskify(cc) { | |
return cc.slice(0, -4).replace(/./g, '#') + cc.slice(-4); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment