Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

telefon

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telefon

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

telefon

Formats a number into a US phone number (e.g: (555) 123-9876). You can customize the format in the options hash.

Usage

require "telefon"

Telefon.convert(5551234)                                     # => 555-1234
Telefon.convert("5551234")                                   # => 555-1234
Telefon.convert(1235551234)                                  # => 123-555-1234
Telefon.convert(1235551234, area_code: true)                 # => (123) 555-1234
Telefon.convert(1235551234, delimiter: " ")                  # => 123 555 1234
Telefon.convert(1235551234, area_code: true, extension: 555) # => (123) 555-1234 x 555
Telefon.convert(1235551234, country_code: 1)                 # => +1-123-555-1234

Telefon.convert(1235551234, country_code: 1, extension: 1343, delimiter: '.')
# => +1.123.555.1234 x 1343

Installation

$ gem install telefon

FAQs

Package last updated on 25 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc