Sha256: 12c47f38b161497209068b98d0bf9b28bcc82ef1e152425daa380a3e8926dada
Contents?: true
Size: 942 Bytes
Versions: 1
Compression:
Stored size: 942 Bytes
Contents
Sanitize MSISDNS as per mobile number format. This is specially useful for formating Android mobile numbers which are stored in different formats. Currently only Indian MSISDNs are supported. ##Usage gem install sanitized_msisdns require 'msisdn_sanitizer' MSISDN::Sanitizer.sanitize('00919876543210') => ["+919876543210"] MSISDN::Sanitizer.sanitize('0987-6543210') => ["+919876543210"] MSISDN::Sanitizer.sanitize(['00919876543210', '9037 123 456', '04972123465']) => ["+919876543210", "+919037123456"] MSISDN::Sanitizer.sanitize(9876543210) => ["+919876543210"] You could also specify options, format & country_code ( Right now the only supported country code is ':in') The defaults are { :country_code => :in, :format => 'international' } MSISDN::Sanitizer.sanitize(['00919876543210', '9037 123 456', '04972123465'], format: 'local') => ["9876543210", "9037123456"]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sanitized_msisdns-0.0.5 | README.md |