Last active
May 17, 2019 15:00
-
-
Save OdinsHat/1f48021af19cde432e63e30537add54c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Add a space 3 from the end of a post code and make uppercase | |
this.address['postCode'] = this.address['postCode'].replace(/.{3}$/,' $&').toUpperCase(); | |
// Add comma for thousand seperator | |
thousands = string.replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment