hixme-ui social security component for consistent formatting.


2.0.0-alpha.123 months ago4 years agoMinified + gzip package size for @hixme-ui/social-security in KB


Social Security

npm i --save @hixme-ui/social-security

View it live

Phone extends the @hixme/text to provide social security number formatting


import SocialSecurity from '@hixme-ui/social-security'

<SocialSecurity number='123456789' />
// ouputs social security format
// <span>***-**-6789</span>

SocialSecurity.format(number, { showFull = false })

SocialSecurity has a format function it uses to display, and is accessible if needed outside of the JSX

import SocialSecurity from '@hixme-ui/social-security'

// outputs string ***-**-6789

Phone.format('123456789', { showFull: true })
// outputs string 123-45-6789

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.