A JS library for number formatting

Overview

numbro

All Contributors

Monthly download

A javascript library for formatting and manipulating numbers.

Website and documentation

Travis Build Status

Master Build Status

Develop Build Status

NPM

NPM

Contributing

See the CONTRIBUTING.md file for contribution information.

Languages

Language tags follow the BCP 47 specification.

Language translations will not be merged without unit tests.

See the english unit tests for an example.

Changelog

See CHANGELOG.md. For the original project (Numeral.js) changelog, see CHANGELOG-Numeraljs.md.

Acknowledgements

numbro is forked from Adam Draper's project Numeral.js, which was in turn inspired by and heavily borrowed from Moment.js.

License

Copyright © 2017-2019 Benjamin Van Ryseghem

Copyright © 2015-2017 Företagsplatsen AB

Copyright © 2014 Adam Draper


Distributed under the MIT license. If you want to know more, see the LICENSE file.

The original license file for Numeral.js can be found in LICENSE-Numeraljs

Contributors

Thanks goes to these wonderful people (emoji key):


A----

💻

Aaron

💻

Adam Draper

💻

Adrian Buzea

💻

Ahmed Al Hafoudh

💻

Alan Kendall

💻

Alex Anthony

🐛 💻

Alex Wolfe

💻

Amir E. Aharoni

💻

Anatoli Papirovski

💻

Andrei Alecu

💻

Andrew Laucius

💻

Andrew May

💻

Anna Osipova

💻

Anthony Short

💻

Aster Haven

💻

Austin Greco

💻

Avétis KAZARIAN

💻

Benjamin Van Ryseghem

💻

Brad Rodriguez

💻

Chris Earle

💻

Chris Nanney

💻

Chris Nicola

💻

Clay Walker

💻

Colin Rudd

💻

Damien Cassou

💻

Dan Poggi

💻

Dan Ristic

💻

Dave Clayton

💻

Dieter Luypaert

💻

Diogo Resende

💻

Dominik Bułaj

💻

Dylan Aïssi

🤔

Ecmel Ercan

💻

Eli Zehavi

💻

Emily Shi

💻

Eric Baer

💻

Erol

💻

Graham McGregor

💻

Gregor Aisch

💻

Guus Goossens

💻

Gwyn Judd

💻

Herinson Rodrigues

💻

Hernan Garcia

💻

Isha Sharma

🐛

Jan Peša

💻

Jarno van Leeuwen

💻

Joe Bordes

💻

Johannes

💻

Jordan Neill

💻

Jordy de Jong

💻

KableM

💻

Koes Bong

💻

Krzysztof Budnik

💻

Kukuh Yoniatmoko

💻

Lars Bauer

💻

Lauris BH

💻

Luís Rudge

💻

Léo Renaud-Allaire

💻

MJ Abadilla

💻

Mahesh Senniappan

💻

Manuel Alabor

💻

Marco Krage

💻

Marcus

💻

Mark Herhold

💻

Martin Večeřa

🐛 💻

Mehmet Yatkı

💻

Michael Piefel

💻

Michael Storgaard

💻

Michiel ter Reehorst

💻

Mike

💻

Mike Guida

💻

Mudit Ameta

💻

Nicolas HENRY

💻

Nicolas Petton

💻

Olmo del Corral

💻

OvidiuBan

🐛

Peter Bakondy

💻

Peter Dave Hello

💻

Quinn

💻

Rafael De Leon

💻

Ramesh Nair

💻

Randy Wilander

💻

Raymond Ha

💻

Remo Laubacher

💻

RichColours

🐛

Rusty Bailey

💻

Sami Saada

💻

Shane Reustle

💻

Sherlyne

💻

Simon B.

💻

Stewart Scott

💻

Sébastien Chopin

💻

T0nio

💻

Tamás Nepusz

💻

Ted Ge

💻

Teppei Sato

💻

The Gitter Badger

💻

Thomas Obermüller

💻

Tim

💻

Tim Fish

💻

Tim Schauder

💻

Tomas Carnecky

💻

Xiaopei Li

💻

Zeke Sikelianos

💻

ben305

💻

bhartidengada

💻

daclayton

💻

gtrombi

💻

j0nixs

🐛

jojosati

💻

phil

💻

rWilander

💻

ragulka

💻

seedy

🐛

sousarka

💻

xiaoli

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Comments
  • update numbro.d.ts to use export = instead of export default

    update numbro.d.ts to use export = instead of export default

    As https://github.com/foretagsplatsen/numbro/blob/develop/dist/numbro.js shows the module is exported as a namespace (module.exports = numbro;), but the Typescript .d.ts file was exporting it using export default numbro.

    This discrepancy makes it impossible to use in TS:

    • If imported using `import numbro from "numbro", then numbro is undefined at runtime.
    • If imported using `import * as numbro from "numbro", TS finds no member.

    This commit changes numbro.d.ts to use exports = that is the correct way of representing the current javascript behaviour.

    opened by olmobrutall 25
  • Regression on null v1.9.3 to v1.10.0

    Regression on null v1.9.3 to v1.10.0

    I appears there has been a behavioural change between v1.9.3 and v.1.10.0 for the following code:

    console.log(numbro(null).format("0.00%"));

    1.9.3 fiddle

    https://jsfiddle.net/deenairn/L6bygxdw/3/

    This outputs: NaN%

    1.10.0 fiddle

    https://jsfiddle.net/deenairn/1nywjby3/2/

    This throws: Uncaught Error: Invalid input numbro.min.js:117

    opened by deenairn 17
  • multiply loses accuracy on minification

    multiply loses accuracy on minification

    This is a problem that was noticed at my work for numeraljs https://github.com/foretagsplatsen/numbro/blob/develop/numbro.js#L930-L937 where

    ...
    var corrFactor = correctionFactor(accum, curr);
    return (accum * corrFactor) * (curr * corrFactor) /
        (corrFactor * corrFactor);
    

    the minifier will remove all those parenthesis and mess up the order of operation. A more cumbersome but accurate solution:

    var corrFactor = correctionFactor(accum, curr),
          result = accum * corrFactor;
          result *= curr * corrFactor;
          result /= corrFactor * corrFactor
    return result;
    

    or however you see fit, so long as the order is maintain after minifying. Test against numbro(46.6).multiply(0.575) === 26.795

    opened by rafde 17
  • Loading languages with requirejs

    Loading languages with requirejs

    How can I load a language file in an AMD environment? Currently trying to load languages.js or any single language file gives a No define call for... error.

    opened by rudym87 16
  • Numbro 2.0.0

    Numbro 2.0.0

    a full rewrite of numbro

    • [x] use es6
    • [x] split up code into modules
    • [x] use eslint
    • [x] use browserify
    • [x] use gulp
    • [x] use jasmine
    • [x] use istanbul

    Todo:

    • [x] implement a format parser
    • [x] more parsing-tests tests
    • [x] add BigNumber support
    • [x] rewrite all languages files
    • [x] fix language loading
    • [x] implement unformat
    • [x] add documentation
    • [x] fix todos
    • [ ] update the website
    • [x] add "format as exponent XXeXX"
    • [x] add dist tests

    New features:

    • the provided format can now be an object
    • defaults are now language specific and not global anymore
    • new options to language files:
      • spaceSeparated: should a space be inserted between the number and an abbreviation/currency symbol
      • currencyDefaults: defaults value for formatting currency
      • byteDefaults: defaults value for formatting byte
      • ordinalDefaults: defaults value for formatting ordinal
      • percentDefaults: defaults value for formatting percent
      • thousandsSize: should that be renamed characteristicGroupSize?
    • cleanup of the API (unformat is now a static method instead of an instance method)
    opened by BenjaminVanRyseghem 14
  • Don't build for all pull requests, only build for releases

    Don't build for all pull requests, only build for releases

    If you have a bunch of pull requests you want to merge in, the min files are going to constantly conflict. I would suggest we don't build for all pull requests, and instead, build for each release.

    enhancement 
    opened by Graham42 14
  • browserify attempts to load all language files

    browserify attempts to load all language files

    The patch in #66 automatically loads all language files for any commonjs scenario, browserify included.

    While I can't really complain about doing this on the server with Node.js, doing this in the browser adds unnecessary bloat that I can't easily remove.

    Possible solutions off the top of my head:

    • provide a way to specify an array of languages which defaults to all languages on Node
    • create special logic for Node within the commonjs scope

    As a side effect, this might help with #70.

    opened by clayzermk1 13
  • Why is 0 formatted as +0?

    Why is 0 formatted as +0?

    var string = numbro(-1).format('+0,0');
    // '-1'
    
    var string = numbro(1).format('+0,0');
    // '+1'
    
    var string = numbro(0).format('+0,0');
    // '+0'
    

    The last one I would expect just 0 without a + prefixed.

    opened by marceloverdijk 13
  • fix issue with en-IE currency

    fix issue with en-IE currency

    Ran into issue when trying to format currency for Ireland. When setting culture as en-IE was getting the following error:

    Currency position should be among ["prefix", "infix", "postfix"]

    Looking at the en-IE.js file in the languages folder, it is missing a property defining the position of the currency symbol. Added this to be prefix since Euro symbols go in front. Updated the test to account for this.

    opened by WesGabbard 12
  • Fix #114: webpack bundling

    Fix #114: webpack bundling

    This PR fixes #114.

    Webpack doesn't seem to like having expressions in a require. The fix required generating an index.js for the language files and loading this rather than looping through using fs.

    In short what I've done:

    1. Added grunt languages to generate an index file for the languages
    2. Removed requireDir as a dependency, now we just load the index file in the tests
    3. We no longer load language files with fs and path but just require the index file directly in the loadCulturesInNode method
    opened by mmollick 12
  • numbro.unformat ignore byte style inputs

    numbro.unformat ignore byte style inputs

    We are using numbro to format/unformat inputs. Currently unformat returns 2 for an input B2, because it checks if the inputs is in the for form of byte style. We would want a way to bypass this behavior i.e. for such input patterns, unformat should return 'undefined'. Please let us know how can this be achieved?

    opened by ghost 11
  • Bump json5 from 2.1.2 to 2.2.3

    Bump json5 from 2.1.2 to 2.2.3

    Bumps json5 from 2.1.2 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)
    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Create uz-UZ.js for Uzbek language

    Create uz-UZ.js for Uzbek language

    Link for uzbek language dictionary: https://uzpharmagency.uz/uploads/pages/Davlat%20tilida%20ish%20yuritish/O%E2%80%98zbek%20tilining%20imlo%20lug%E2%80%98ati%20(2013).pdf

    opened by qayrat-sultan 0
  • Bump electron from 13.1.8 to 18.3.7

    Bump electron from 13.1.8 to 18.3.7

    Bumps electron from 13.1.8 to 18.3.7.

    Release notes

    Sourced from electron's releases.

    electron v18.3.7

    Release Notes for v18.3.7

    Fixes

    • Fixed WCO not responding to touch events on windows. #35177 (Also in 19, 20)
    • Fixed webContents.getUserAgent() incorrectly returning an empty string unless previously set. #35130 (Also in 17, 19, 20)
    • Fixed an issue in which calling setBounds() after e.preventDefault in a 'will-move' or 'will-resize' event wouldn't change the window's shape until the mouse button was released. #35082 (Also in 19, 20)
    • Fixed context menu not showing all items on macOS when dock is not hidden. #35198 (Also in 19)
    • None. #35171 (Also in 19, 20)

    Other Changes

    • Fixed page size always being restricted to 4k on Linux arm64. #35184
    • Security: backported fix for CVE-2022-2478. #35099
    • Security: backported fix for chromium:1334864. #35097

    electron v18.3.6

    Release Notes for v18.3.6

    Fixes

    • Fixed a crash when calling BrowserWindow.setEnabled(). #34973 (Also in 19, 20)
    • Fixed a potential crash when changing window settings after initializing WCO with an invalid titleBarStyle. #34873 (Also in 17, 19, 20)
    • Fixed alwaysOnTop BrowserWindow option for X11 Linux. #34911 (Also in 19, 20)
    • Fixed an issue where BrowserWindows on macOS were incorrectly marked as resizable. #34907 (Also in 19, 20)
    • Fixed an issue where Windows Control Overlay buttons did not respect maximizable/minimizable/closable states of a BrowserWindow. #34720 (Also in 17, 19, 20)
    • Fixed an issue where calling BrowserWindow.setRepresentedFilename on macOS with titlebarStyle: 'hiddenInset' or titlebarStyle: 'hidden' inadvertently moves the traffic light location. #34847 (Also in 19, 20)
    • Fixed an issue where some BrowserWindows opened from new links wouldn't properly load URLs. #34910 (Also in 19)
    • Fixed an issue where the minimize button with WCO enabled would incorrectly be highlighted in some cases. #34838 (Also in 17, 19, 20)
    • Fixed an issue with background colors being improperly applied to BrowserViews on Windows. #33478 (Also in 16)
    • Fixed empty app_id when running under wayland. #34877 (Also in 19, 20)
    • Fixed missing Sec-CH-UA headers and empty navigator.userAgentData. #34758 (Also in 17, 19, 20)
    • Fixed symbol generation on 32-bit Windows release builds. #35096 (Also in 19, 20)
    • Prevent brief display of "Ozone X11" in window title on Linux. #34943

    Other Changes

    • Backported fix for CVE-2022-2294. #34882
    • Security: backported fix for 1287804. #35102
    • Security: backported fix for 1333333. #34689
    • Security: backported fix for 1335054. #34687
    • Security: backported fix for 1335458. #34685
    • Security: backported fix for 1336014. #35004
    • Security: backported fix for 1339844. #35002
    • Security: backported fix for 1340335. #35000
    • Security: backported fix for 1340654. #34998
    • Security: backported fix for CVE-2022-2162. #34714
    • Security: backported fix for CVE-2022-2295. #34881

    electron v18.3.5

    Release Notes for v18.3.5

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump socket.io-parser from 4.0.4 to 4.0.5

    Bump socket.io-parser from 4.0.4 to 4.0.5

    Bumps socket.io-parser from 4.0.4 to 4.0.5.

    Release notes

    Sourced from socket.io-parser's releases.

    4.0.5

    Bug Fixes

    • check the format of the index of each attachment (b559f05)

    Links

    Changelog

    Sourced from socket.io-parser's changelog.

    4.0.5 (2022-06-27)

    Bug Fixes

    • check the format of the index of each attachment (b559f05)

    4.2.0 (2022-04-17)

    Features

    • allow the usage of custom replacer and reviver (#112) (b08bc1a)

    4.1.2 (2022-02-17)

    Bug Fixes

    • allow objects with a null prototype in binary packets (#114) (7f6b262)

    4.1.1 (2021-10-14)

    4.1.0 (2021-10-11)

    Features

    • provide an ESM build with and without debug (388c616)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Update Indonesian currency (Rp) position

    Update Indonesian currency (Rp) position

    I was trying out sushi and noticed that when using Rp/IDR, the symbol is added after the number. This is not what we usually use in Indonesian, and I traced it back here.

    However, I also cannot find an official source that states Rp is a prefix (maybe I'm not using the correct keywords to search for this info). The best I can find is this online PUEBI (Pedoman Umum Ejaan Bahasa Indonesia) - translated to English: General Guidelines for Indonesian Spelling

    https://puebi.js.org/kata/angka

    The examples there uses Rp as a prefix image

    image

    opened by 1412kaito 0
Releases(2.3.6)
  • 2.3.6(Dec 16, 2021)

    • Fix spacing issue with en-GB currency. Thanks @DamienCassou
    • Fix #507: mantissa precision produces wrong results for certain numbers. Thanks @swissmanu
    Source code(tar.gz)
    Source code(zip)
  • 2.3.3(Aug 8, 2021)

    2.3.3

    • Fix #597: Fix issue with en-IE currency. Thanks @Blackbaud-WesGabbard
    • Fix #590: Fix German abbreviations Thanks @chaosflaws
    • Fix #602: Fix Hebrew words for million and billion Thanks @amire80
    • Fix #604: add lowPrecision to typescript definitions Thanks @fullaive
    Source code(tar.gz)
    Source code(zip)
  • 2.3.2(Oct 30, 2020)

    • Fix fr abbreviation. Thanks @BenjaminVanRyseghem
    • Fix #541: validate(0) return false. Thanks @BenjaminVanRyseghem
    • Fix #558: missing object bytes for language en-GB. Thanks @BenjaminVanRyseghem
    • Allow trimMantissa hint in string format. Thanks @lexanth
    • Fix #577: allow space between abbreviations and postfix currency symbols. Thanks @marvec
    Source code(tar.gz)
    Source code(zip)
  • 2.3.1(Oct 30, 2020)

    • Introduce lowPrecision to tweak precision when computing average value. Thanks @BenjaminVanRyseghem
    • Fix #411: spaceSeparated is not working for bytes. Thanks @BenjaminVanRyseghem
    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Oct 30, 2020)

    • Bump lodash.template to 4.5.0. Thanks @BenjaminVanRyseghem
    • Fix TypeScript return type definition of Format.currencySymbol. Thanks @jarnovanleeuwen
    • Fix #359: Add Bytes I18N possibility + French translation. Thanks @T0nio
    • Fix #474: Fix Bytes formatting tests and coverage. Thanks @austingreco
    • Fix #425: Fix interpretation of totalLength with negative numbers. Thanks @DamienCassou
    • Fix #462: Fix negative number format issue. Thanks @bhartibdengada
    • Fix #546: Format issue with average. Thanks @BenjaminVanRyseghem
    • Fix #383: BigNumber Issue - new BigNumber() number type has more than 15 significant digits. Thanks @BenjaminVanRyseghem
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Oct 30, 2020)

    • Fix dependencies through npm audit --production
    • Fix #446: CDNJS in website Relocation. Thanks @pranithan-kang
    • Fix #364: Format Decimal without Rounding. Thanks @shefrancia
    • Fix #414: Fix de-CH thousands separator. Thanks @FrEaKmAn
    • Fix #418: Correct symbol and sign order for formatCurrency when forceSign=true. Thanks @adriang133
    • Fix #424: Add ordinal for 40 for tr-TR. Thanks @yatki
    • Fix #423: No way to have space separated abbreviation and not-separated currency symbol at the same time. Thanks @Osipova
    • Fix #392: Small negative numbers get the leading zero incorrectly cut off. Thanks @Rudd
    • Fix #403: Update numbro.d.ts to match the current API of the library. Thanks @Monck
    • Fix #428: Fix id thousands and decimal separator. Thanks @kukuhyoniatmoko
    • Fix #453: Fix broken BCP47 link. Thanks @sesam
    Source code(tar.gz)
    Source code(zip)
  • 2.1.2(Oct 30, 2020)

    • Fix #399: Update dependencies. Thanks @baer
    • Fix #390: Small changes to doc comments. Thanks @cnrudd
    • Fix #328: Fixed unformat for non standard delimiters. Thanks @jkettmann
    Source code(tar.gz)
    Source code(zip)
  • 2.0.6(Mar 21, 2018)

    • Fix #344: Add format option to specify currency symbol position. Thanks @BenjaminVanRyseghem.
    • Fix #343: Mantissa not taken into account when no decimals. Thanks @BenjaminVanRyseghem.
    • Fix #342: fix typing of numbro.languages(). Thanks @ntamas.
    • Fix #334: Update numbro.d.ts. Thanks @ sousarka.
    • Fix #330: Fix language file permissions. Thanks @thomas88.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.5(Mar 20, 2018)

    • Fix #325: Unable to resolve module ./globalState. Thanks @BenjaminVanRyseghem.
    • Fix #323: add missing option in typings. Thanks @nicolashenry.
    • Fix #322: "spaced" should be optional in typings. Thanks @nicolashenry.
    Source code(tar.gz)
    Source code(zip)
  • 1.10.1(May 2, 2017)

    • Fix #239: Add de-AT localization. Thanks @gwynjudd.
    • Fix #242: Added de-LI localisation. Thanks @gwynjudd.
    • Fix #243: en-IE localization. Thanks @gwynjudd.
    • Fix #246: Added it-CH localization. Thanks @gwynjudd.
    • Fix #265: Revert Error thrown when invalid input. Thanks @BenjaminVanRyseghem.
    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Mar 27, 2017)

    • Fix #213: Unhelpful Error Message with $ as Format String. Thanks @reustle.
    • Fix #221: update package.json license field. Thanks @mguida22.
    • Fix #190: Allow abbreviation precision for < 4. Thanks @chrisnicola.
    • Fix #227: Add Romanian locale. Thanks @herodrigues.
    • Fix #222: allow a decimal format for an integer. Thanks @mguida22.
    • Fix #233: Correct CZ and SK locales (finally). Thanks @smajl.
    • Fix #244: Fixes for fr-CH. Thanks @gwynjudd.
    • Fix #262: Better input validation. Thanks @BenjaminVanRyseghem.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.3(Mar 27, 2017)

    • Fix #184: Accurate, up-to-date type definitions for TypeScript. Thanks @dpoggi.
    • Fix #196: Fix german language specifications. Thanks @Ben305.
    • Fix #197: Add detection for Meteor. Thanks @Ben305.
    • Fix #206: fix number formats for de-CH. Thanks @Remo.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.1(Jul 22, 2016)

  • 1.9.0(Jul 22, 2016)

    • Fix #192: Add locales en-AU and en-NZ. Thanks @Ben305.
    • Fix #193: Add function formatForeignCurrency. Thanks @Ben305.
    • Fix #194: Fix undefined error on React native. Thanks @abalhier.
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Mar 22, 2016)

    • Fix decimal rounding issue. Thanks @Shraymonks.
    • Fix #114: webpack bundling. Thanks @mmollick.
    • Add ko-KR & zh-TW support. Thanks @rocketedaway and @rWilander.
    • Add existence check for require. Thanks @jamiter.
    • Improve verbatim feature. Thanks @jneill.
    Source code(tar.gz)
    Source code(zip)
  • 1.6.2(Oct 16, 2015)

  • 1.6.1(Oct 16, 2015)

  • 1.6.0(Oct 16, 2015)

    • Introduce new API functions:
      • setCulture
      • culture
      • cultureData
      • cultures
    • Deprecate API functions:
      • setLanguage
      • language
      • languageData
      • languages
    Source code(tar.gz)
    Source code(zip)
  • 1.5.2(Oct 16, 2015)

    • Fixed scoping issue. Thanks @tuimz
    • #68 Format decimal numbers. Thanks @BenjaminVanRyseghem
    • #70 v1.5.0 error with browserify. Thanks @BenjaminVanRyseghem
    • #71 Incorrectly reporting hasModule = true. Thanks @BenjaminVanRyseghem
    • #72 the currency symbol is $ which is a currency symbol already by itself (the dollar..). Thanks @BenjaminVanRyseghem
    • #76 ability to "pad" a number in formatting. Thanks @BenjaminVanRyseghem
    • #79 browserify attempts to load all language files. Thanks @BenjaminVanRyseghem
    • #106 Exception on large number formatting. Thanks @andrewla
    Source code(tar.gz)
    Source code(zip)
  • 1.5.1(Oct 14, 2015)

    1.5.1

    #78 Why is 0 formatted as +0?. Thanks to @clayzermk1 #80 currency format "+$..." produces output "$+...". Thanks to @clayzermk1 Fixes German separator. Thanks to @gka

    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Jul 2, 2015)

  • 1.4.0(Jul 2, 2015)

  • 1.3.3(Jul 2, 2015)

  • 1.3.2(Jun 24, 2015)

Owner
Benjamin Van Ryseghem
OOP & FP enthusiast
Benjamin Van Ryseghem
A JS library for number formatting

numbro A javascript library for formatting and manipulating numbers. Website and documentation Travis Build Status Master Develop NPM Contributing See

Benjamin Van Ryseghem 970 Jan 2, 2023
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

jquery-input-mask-phone-number A jQuery Plugin to make masks on input field to US phone format. Quick start 1. Add latest jQuery and jquery-input-mask

Raja Rama Mohan Thavalam 12 Aug 25, 2022
Multiplies a number by zero. Useful for when you need to multiply a number by zero

multiply-by-zero Multiplies a number by zero. Useful for when you need to multiply a number by zero Please consider checking out the links of this pro

Dheirya Tyagi 2 Jul 3, 2022
A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

Jesse Pollak 528 Dec 30, 2022
Another logger in JS. This one offers a console.log-like API and formatting, colored lines and timestamps (or not if desired), all that with 0 dependencies.

hellog Your new logger ! hellog is a general-purpose logging library. It offers a console.log-like API and formatting, extensible type-safety colored

Maxence Lecanu 4 Jan 5, 2022
Obsidian plugin that adds autocomplete and auto-formatting to frontmatter tags.

Obsidian Front Matter Tag Wizard Tired of having to type # to get tag autocompletion in your Obsidian note front matter? I feel your pain. This plugin

Eric 10 Nov 5, 2022
Visual Studio Code extension for formatting and linting Django/Jinja HTML templates using djLint

Visual Studio Code extension for formatting and linting Django/Jinja HTML templates using djLint

Almaz 25 Dec 15, 2022
The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

Remix 311 Jan 1, 2023
The Remix Stack for deploying to Fly with Supabase, authentication, testing, linting, formatting, etc.

Remix Supa Fly Stack Learn more about Remix Stacks. npx create-remix --template rphlmr/supa-fly-stack What's in the stack Fly app deployment with Doc

Raphaël Moreau 157 Jan 7, 2023
The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Remix Speed Metal Stack Learn more about Remix Stacks. npx create-remix --template Girish21/speed-metal-stack Remix Blog ?? This blog starter template

Girish 141 Jan 2, 2023
The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

Remix Indie Stack Learn more about Remix Stacks. npx create-remix --template remix-run/indie-stack What's in the stack Fly app deployment with Docker

Remix 688 Dec 30, 2022
🌐 Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack ?? ??️ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Ivanka Todorova 24 Jul 8, 2022
The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

Remix 677 Jan 2, 2023
The Remix Stack for deploying to Vercel with testing, linting, formatting, structure and mock for 3rd party API integration.

Remix DnB Stack See it live: https://dnb-stack.vercel.app/ Learn more about Remix Stacks. npx create-remix --template robipop22/dnb-stack What's in th

Robert Pop 61 Dec 13, 2022
🍺 Integrates Laravel Pint into your VSCode projects for automatic code formatting

Laravel Pint for VS Code This extension is NOT official from the Laravel team. Take a look into the official project. Integrates Laravel Pint into you

Open Southeners 34 Dec 8, 2022
Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Ilango 56 Dec 25, 2022