Socket
Book a DemoInstallSign in
Socket

ons-numbers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ons-numbers

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

ONS Numbers RubyGem

A utility class for formatting numbers in common ways. Note that this gem targets Ruby 3.0 and above.

Installation

gem install ons-numbers

Examples

require 'ons-numbers'

Numbers.currency(1234.56) # => "£1,234.56"
Numbers.grouped(1234567) # => "1,234,567"
Numbers.percentage(75, 100) # => "75.0%"

Testing

rake test

Licence

This library is licensed under the MIT licence. Full licence text is available in LICENCE.

Copyright (C) 2022 Crown Copyright (Office for National Statistics)

FAQs

Package last updated on 29 Apr 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.