@hixme-ui/social-security

hixme-ui social security component for consistent formatting.

Stats

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

Readme

Social Security

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

View it live

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

Usage

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'

Phone.format('123456789')
// 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.