From 899ed22f998abd97e9dea3b4f0e85f9ad561c1f9 Mon Sep 17 00:00:00 2001 From: Benjamin Van Ryseghem Date: Wed, 10 Jun 2015 20:50:47 +0200 Subject: [PATCH] Release 1.2.2 --- CHANGELOG.md | 4 + bower.json | 2 +- component.json | 2 +- dist/min/languages.min.js | 154 ------------------------------- dist/min/languages/cs-CZ.min.js | 6 -- dist/min/languages/da-DK.min.js | 6 -- dist/min/languages/de-DE.min.js | 6 -- dist/min/languages/de-ch.min.js | 6 -- dist/min/languages/en-GB.min.js | 6 -- dist/min/languages/es-AR.min.js | 6 -- dist/min/languages/es-ES.min.js | 6 -- dist/min/languages/et-EE.min.js | 9 -- dist/min/languages/fa-IR.min.js | 6 -- dist/min/languages/fi-FI.min.js | 6 -- dist/min/languages/fil-PH.min.js | 6 -- dist/min/languages/fr-CA.min.js | 6 -- dist/min/languages/fr-CH.min.js | 6 -- dist/min/languages/fr-FR.min.js | 6 -- dist/min/languages/hu-HU.min.js | 6 -- dist/min/languages/it-IT.min.js | 6 -- dist/min/languages/ja-JP.min.js | 6 -- dist/min/languages/lv-LV.min.js | 6 -- dist/min/languages/nb-NO.min.js | 6 -- dist/min/languages/nl-BE.min.js | 6 -- dist/min/languages/nl-NL.min.js | 6 -- dist/min/languages/pl-PL.min.js | 6 -- dist/min/languages/pt-BR.min.js | 6 -- dist/min/languages/pt-PT.min.js | 6 -- dist/min/languages/ru-RU.min.js | 6 -- dist/min/languages/ru-UA.min.js | 1 - dist/min/languages/sk-SK.min.js | 6 -- dist/min/languages/sv-SE.min.js | 6 -- dist/min/languages/th-TH.min.js | 6 -- dist/min/languages/tr-TR.min.js | 6 -- dist/min/languages/uk-UA.min.js | 1 - dist/min/languages/zh-CN.min.js | 6 -- dist/min/numbro.min.js | 8 -- dist/numbro.js | 4 +- dist/numbro.min.js | 4 +- numbro.js | 4 +- package.json | 2 +- 41 files changed, 13 insertions(+), 356 deletions(-) delete mode 100644 dist/min/languages.min.js delete mode 100644 dist/min/languages/cs-CZ.min.js delete mode 100644 dist/min/languages/da-DK.min.js delete mode 100644 dist/min/languages/de-DE.min.js delete mode 100644 dist/min/languages/de-ch.min.js delete mode 100644 dist/min/languages/en-GB.min.js delete mode 100644 dist/min/languages/es-AR.min.js delete mode 100644 dist/min/languages/es-ES.min.js delete mode 100644 dist/min/languages/et-EE.min.js delete mode 100644 dist/min/languages/fa-IR.min.js delete mode 100644 dist/min/languages/fi-FI.min.js delete mode 100644 dist/min/languages/fil-PH.min.js delete mode 100644 dist/min/languages/fr-CA.min.js delete mode 100644 dist/min/languages/fr-CH.min.js delete mode 100644 dist/min/languages/fr-FR.min.js delete mode 100644 dist/min/languages/hu-HU.min.js delete mode 100644 dist/min/languages/it-IT.min.js delete mode 100644 dist/min/languages/ja-JP.min.js delete mode 100644 dist/min/languages/lv-LV.min.js delete mode 100644 dist/min/languages/nb-NO.min.js delete mode 100644 dist/min/languages/nl-BE.min.js delete mode 100644 dist/min/languages/nl-NL.min.js delete mode 100644 dist/min/languages/pl-PL.min.js delete mode 100644 dist/min/languages/pt-BR.min.js delete mode 100644 dist/min/languages/pt-PT.min.js delete mode 100644 dist/min/languages/ru-RU.min.js delete mode 100644 dist/min/languages/ru-UA.min.js delete mode 100644 dist/min/languages/sk-SK.min.js delete mode 100644 dist/min/languages/sv-SE.min.js delete mode 100644 dist/min/languages/th-TH.min.js delete mode 100644 dist/min/languages/tr-TR.min.js delete mode 100644 dist/min/languages/uk-UA.min.js delete mode 100644 dist/min/languages/zh-CN.min.js delete mode 100644 dist/min/numbro.min.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e18cfb..f0185740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.2.2 + +- Remove old minified files + ### 1.2.1 - Forgot to build when published diff --git a/bower.json b/bower.json index 922553cd..c6c2f969 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "numbro", "repo": "foretagsplatsen/numbro", - "version": "1.2.1", + "version": "1.2.2", "description": "Format and manipulate numbers.", "keywords": [ "numeral", diff --git a/component.json b/component.json index f8cace6e..ee62dc47 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "numbro", "repo": "foretagsplatsen/numbro", - "version": "1.2.1", + "version": "1.2.2", "description": "Format and manipulate numbers.", "keywords": [ "numeral", diff --git a/dist/min/languages.min.js b/dist/min/languages.min.js deleted file mode 100644 index 2bada5ef..00000000 --- a/dist/min/languages.min.js +++ /dev/null @@ -1,154 +0,0 @@ -/*! - * numbro.js language configuration - * language : czech (cs) - * author : Anatoli Papirovski : https://github.com/apapirovski - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("cs-CZ",a)}(),/*! - * numbro.js language configuration - * language : danish denmark (dk) - * author : Michael Storgaard : https://github.com/mstorgaard - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(a){return"."},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("da-DK",a)}(),/*! - * numbro.js language configuration - * language : German (de) – generally useful in Germany, Austria, Luxembourg, Belgium - * author : Marco Krage : https://github.com/sinky - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("de-DE",a)}(),/*! - * numbro.js language configuration - * language : German in Switzerland (de-ch) - * author : Michael Piefel : https://github.com/piefel (based on work from Marco Krage : https://github.com/sinky) - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"CHF",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("de-CH",a)}(),/*! - * numbro.js language configuration - * language : english united kingdom (uk) - * author : Dan Ristic : https://github.com/dristic - */ -function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"£",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("en-GB",a)}(),/*! - * numbro.js language configuration - * language : spanish - * author : Hernan Garcia : https://github.com/hgarcia - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===b||3===b?"er":2===b?"do":7===b||0===b?"mo":8===b?"vo":9===b?"no":"to"},currency:{symbol:"$",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("es-AR",a)}(),/*! - * numbro.js language configuration - * language : spanish Spain - * author : Hernan Garcia : https://github.com/hgarcia - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===b||3===b?"er":2===b?"do":7===b||0===b?"mo":8===b?"vo":9===b?"no":"to"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("es",a)}(),/*! - * numbro.js language configuration - * language : Estonian - * author : Illimar Tambek : https://github.com/ragulka - * - * Note: in Estonian, abbreviations are always separated - * from numbers with a space - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("et-EE",a)}(),/*! - * numbro.js language configuration - * language : Farsi Iran - * author : neo13 : https://github.com/neo13 - */ -function(){var a={delimiters:{thousands:"،",decimal:"."},abbreviations:{thousand:"هزار",million:"میلیون",billion:"میلیارد",trillion:"تریلیون"},ordinal:function(a){return"ام"},currency:{symbol:"﷼"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fa-IR",a)}(),/*! - * numbro.js language configuration - * language : Finnish - * author : Sami Saada : https://github.com/samitheberber - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fi-FI",a)}(),/*! - * numbro.js language configuration - * language : filipino philippines (ph) - * author : Michael Abadilla : https://github.com/mjmaix - */ -function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"₱"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fil-PH",a)}(),/*! - * numbro.js language configuration - * language : french (Canada) (fr-CA) - * author : Léo Renaud-Allaire : https://github.com/renaudleo - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-CA",a)}(),/*! - * numbro.js language configuration - * language : french (fr-ch) - * author : Adam Draper : https://github.com/adamwdraper - */ -function(){var a={delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"CHF",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-CH",a)}(),/*! - * numbro.js language configuration - * language : french (fr) - * author : Adam Draper : https://github.com/adamwdraper - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-FR",a)}(),/*! - * numbro.js language configuration - * language : Hungarian (hu) - * author : Peter Bakondy : https://github.com/pbakondy - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:" Ft",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("hu-HU",a)}(),/*! - * numbro.js language configuration - * language : italian Italy (it) - * author : Giacomo Trombi : http://cinquepunti.it - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("it-IT",a)}(),/*! - * numbro.js language configuration - * language : japanese - * author : teppeis : https://github.com/teppeis - */ -function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ja-JP",a)}(),/*! - * numbro.js language configuration - * language : Latvian (lv) - * author : Lauris Bukšis-Haberkorns : https://github.com/Lafriks - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tūkst.",million:" milj.",billion:" mljrd.",trillion:" trilj."},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("lv-LV",a)}(),/*! - * numbro.js language configuration - * language : norwegian - * author : Benjamin Van Ryseghem - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"M",billion:"md",trillion:"t"},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nb-NO",a)}(),/*! - * numbro.js language configuration - * language : belgium-dutch (be-nl) - * author : Dieter Luypaert : https://github.com/moeriki - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(a){var b=a%100;return 0!==a&&1>=b||8===b||b>=20?"ste":"de"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nl-BE",a)}(),/*! - * numbro.js language configuration - * language : netherlands-dutch (nl-nl) - * author : Dave Clayton : https://github.com/davedx - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(a){var b=a%100;return 0!==a&&1>=b||8===b||b>=20?"ste":"de"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nl-NL",a)}(),/*! - * numbro.js language configuration - * language : polish (pl) - * author : Dominik Bulaj : https://github.com/dominikbulaj - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(a){return"."},currency:{symbol:"PLN",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pl-PL",a)}(),/*! - * numbro.js language configuration - * language : portuguese brazil (pt-br) - * author : Ramiro Varandas Jr : https://github.com/ramirovjr - */ -function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"R$",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pt-BR",a)}(),/*! - * numbro.js language configuration - * language : portuguese (pt-pt) - * author : Diogo Resende : https://github.com/dresende - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pt-PT",a)}(),/*! - * numbro.js language configuration - * language : russian (ru) - * author : Anatoli Papirovski : https://github.com/apapirovski - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"руб.",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ru-RU",a)}(),function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ru-UA",a)}(),/*! - * numbro.js language configuration - * language : slovak (sk) - * author : Ahmed Al Hafoudh : http://www.freevision.sk - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("sk-SK",a)}(),/*! - * numbro.js language configuration - * language : swedish - Sweden - * author : Benjamin Van Ryseghem (benjamin.vanryseghem.com) - */ -function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"M",billion:"md",trillion:"t"},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("sv-SE",a)}(),/*! - * numbro.js language configuration - * language : thai (th) - * author : Sathit Jittanupat : https://github.com/jojosati - */ -function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(a){return"."},currency:{symbol:"฿",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("th-TH",a)}(),/*! - * numbro.js language configuration - * language : turkish (tr) - * author : Ecmel Ercan : https://github.com/ecmel, Erhan Gundogan : https://github.com/erhangundogan, Burak Yiğit Kaya: https://github.com/BYK - */ -function(){var a={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},b={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(b){if(0===b)return"'ıncı";var c=b%10,d=b%100-c,e=b>=100?100:null;return a[c]||a[d]||a[e]},currency:{symbol:"₺",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=b),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("tr-TR",b)}(),function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("uk-UA",a)}(),/*! - * numbro.js language configuration - * language : simplified chinese - * author : badplum : https://github.com/badplum - */ -function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("zh-CN",a)}(); \ No newline at end of file diff --git a/dist/min/languages/cs-CZ.min.js b/dist/min/languages/cs-CZ.min.js deleted file mode 100644 index 251fc3a0..00000000 --- a/dist/min/languages/cs-CZ.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : czech (cs) - * author : Anatoli Papirovski : https://github.com/apapirovski - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("cs-CZ",a)}(); \ No newline at end of file diff --git a/dist/min/languages/da-DK.min.js b/dist/min/languages/da-DK.min.js deleted file mode 100644 index 16537f72..00000000 --- a/dist/min/languages/da-DK.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : danish denmark (dk) - * author : Michael Storgaard : https://github.com/mstorgaard - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(a){return"."},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("da-DK",a)}(); \ No newline at end of file diff --git a/dist/min/languages/de-DE.min.js b/dist/min/languages/de-DE.min.js deleted file mode 100644 index d28f8fb4..00000000 --- a/dist/min/languages/de-DE.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : German (de) – generally useful in Germany, Austria, Luxembourg, Belgium - * author : Marco Krage : https://github.com/sinky - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("de-DE",a)}(); \ No newline at end of file diff --git a/dist/min/languages/de-ch.min.js b/dist/min/languages/de-ch.min.js deleted file mode 100644 index 4adf59b1..00000000 --- a/dist/min/languages/de-ch.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : German in Switzerland (de-ch) - * author : Michael Piefel : https://github.com/piefel (based on work from Marco Krage : https://github.com/sinky) - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"CHF",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("de-CH",a)}(); \ No newline at end of file diff --git a/dist/min/languages/en-GB.min.js b/dist/min/languages/en-GB.min.js deleted file mode 100644 index 953ab756..00000000 --- a/dist/min/languages/en-GB.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : english united kingdom (uk) - * author : Dan Ristic : https://github.com/dristic - */ -!function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"£",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("en-GB",a)}(); \ No newline at end of file diff --git a/dist/min/languages/es-AR.min.js b/dist/min/languages/es-AR.min.js deleted file mode 100644 index e775c2f6..00000000 --- a/dist/min/languages/es-AR.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : spanish - * author : Hernan Garcia : https://github.com/hgarcia - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===b||3===b?"er":2===b?"do":7===b||0===b?"mo":8===b?"vo":9===b?"no":"to"},currency:{symbol:"$",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("es-AR",a)}(); \ No newline at end of file diff --git a/dist/min/languages/es-ES.min.js b/dist/min/languages/es-ES.min.js deleted file mode 100644 index 0c6d3db2..00000000 --- a/dist/min/languages/es-ES.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : spanish Spain - * author : Hernan Garcia : https://github.com/hgarcia - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===b||3===b?"er":2===b?"do":7===b||0===b?"mo":8===b?"vo":9===b?"no":"to"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("es",a)}(); \ No newline at end of file diff --git a/dist/min/languages/et-EE.min.js b/dist/min/languages/et-EE.min.js deleted file mode 100644 index 03165383..00000000 --- a/dist/min/languages/et-EE.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * numbro.js language configuration - * language : Estonian - * author : Illimar Tambek : https://github.com/ragulka - * - * Note: in Estonian, abbreviations are always separated - * from numbers with a space - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("et-EE",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fa-IR.min.js b/dist/min/languages/fa-IR.min.js deleted file mode 100644 index c72e8272..00000000 --- a/dist/min/languages/fa-IR.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : Farsi Iran - * author : neo13 : https://github.com/neo13 - */ -!function(){var a={delimiters:{thousands:"،",decimal:"."},abbreviations:{thousand:"هزار",million:"میلیون",billion:"میلیارد",trillion:"تریلیون"},ordinal:function(a){return"ام"},currency:{symbol:"﷼"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fa-IR",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fi-FI.min.js b/dist/min/languages/fi-FI.min.js deleted file mode 100644 index 7c2f3009..00000000 --- a/dist/min/languages/fi-FI.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : Finnish - * author : Sami Saada : https://github.com/samitheberber - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fi-FI",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fil-PH.min.js b/dist/min/languages/fil-PH.min.js deleted file mode 100644 index d1927ac4..00000000 --- a/dist/min/languages/fil-PH.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : filipino philippines (ph) - * author : Michael Abadilla : https://github.com/mjmaix - */ -!function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"₱"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fil-PH",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fr-CA.min.js b/dist/min/languages/fr-CA.min.js deleted file mode 100644 index bba58960..00000000 --- a/dist/min/languages/fr-CA.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : french (Canada) (fr-CA) - * author : Léo Renaud-Allaire : https://github.com/renaudleo - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-CA",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fr-CH.min.js b/dist/min/languages/fr-CH.min.js deleted file mode 100644 index e942f5aa..00000000 --- a/dist/min/languages/fr-CH.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : french (fr-ch) - * author : Adam Draper : https://github.com/adamwdraper - */ -!function(){var a={delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"CHF",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-CH",a)}(); \ No newline at end of file diff --git a/dist/min/languages/fr-FR.min.js b/dist/min/languages/fr-FR.min.js deleted file mode 100644 index b0c9e4f2..00000000 --- a/dist/min/languages/fr-FR.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : french (fr) - * author : Adam Draper : https://github.com/adamwdraper - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("fr-FR",a)}(); \ No newline at end of file diff --git a/dist/min/languages/hu-HU.min.js b/dist/min/languages/hu-HU.min.js deleted file mode 100644 index 0cb5b41e..00000000 --- a/dist/min/languages/hu-HU.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : Hungarian (hu) - * author : Peter Bakondy : https://github.com/pbakondy - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:" Ft",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("hu-HU",a)}(); \ No newline at end of file diff --git a/dist/min/languages/it-IT.min.js b/dist/min/languages/it-IT.min.js deleted file mode 100644 index f1a4872a..00000000 --- a/dist/min/languages/it-IT.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : italian Italy (it) - * author : Giacomo Trombi : http://cinquepunti.it - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("it-IT",a)}(); \ No newline at end of file diff --git a/dist/min/languages/ja-JP.min.js b/dist/min/languages/ja-JP.min.js deleted file mode 100644 index 21bed3a7..00000000 --- a/dist/min/languages/ja-JP.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : japanese - * author : teppeis : https://github.com/teppeis - */ -!function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ja-JP",a)}(); \ No newline at end of file diff --git a/dist/min/languages/lv-LV.min.js b/dist/min/languages/lv-LV.min.js deleted file mode 100644 index 17d96273..00000000 --- a/dist/min/languages/lv-LV.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : Latvian (lv) - * author : Lauris Bukšis-Haberkorns : https://github.com/Lafriks - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tūkst.",million:" milj.",billion:" mljrd.",trillion:" trilj."},ordinal:function(a){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("lv-LV",a)}(); \ No newline at end of file diff --git a/dist/min/languages/nb-NO.min.js b/dist/min/languages/nb-NO.min.js deleted file mode 100644 index 47a78cfc..00000000 --- a/dist/min/languages/nb-NO.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : norwegian - * author : Benjamin Van Ryseghem - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"M",billion:"md",trillion:"t"},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nb-NO",a)}(); \ No newline at end of file diff --git a/dist/min/languages/nl-BE.min.js b/dist/min/languages/nl-BE.min.js deleted file mode 100644 index 9901bf5a..00000000 --- a/dist/min/languages/nl-BE.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : belgium-dutch (be-nl) - * author : Dieter Luypaert : https://github.com/moeriki - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(a){var b=a%100;return 0!==a&&1>=b||8===b||b>=20?"ste":"de"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nl-BE",a)}(); \ No newline at end of file diff --git a/dist/min/languages/nl-NL.min.js b/dist/min/languages/nl-NL.min.js deleted file mode 100644 index a0df1f82..00000000 --- a/dist/min/languages/nl-NL.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : netherlands-dutch (nl-nl) - * author : Dave Clayton : https://github.com/davedx - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(a){var b=a%100;return 0!==a&&1>=b||8===b||b>=20?"ste":"de"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("nl-NL",a)}(); \ No newline at end of file diff --git a/dist/min/languages/pl-PL.min.js b/dist/min/languages/pl-PL.min.js deleted file mode 100644 index 5c02cecd..00000000 --- a/dist/min/languages/pl-PL.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : polish (pl) - * author : Dominik Bulaj : https://github.com/dominikbulaj - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(a){return"."},currency:{symbol:"PLN",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pl-PL",a)}(); \ No newline at end of file diff --git a/dist/min/languages/pt-BR.min.js b/dist/min/languages/pt-BR.min.js deleted file mode 100644 index 11765130..00000000 --- a/dist/min/languages/pt-BR.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : portuguese brazil (pt-br) - * author : Ramiro Varandas Jr : https://github.com/ramirovjr - */ -!function(){var a={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"R$",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pt-BR",a)}(); \ No newline at end of file diff --git a/dist/min/languages/pt-PT.min.js b/dist/min/languages/pt-PT.min.js deleted file mode 100644 index b23a42c2..00000000 --- a/dist/min/languages/pt-PT.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : portuguese (pt-pt) - * author : Diogo Resende : https://github.com/dresende - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("pt-PT",a)}(); \ No newline at end of file diff --git a/dist/min/languages/ru-RU.min.js b/dist/min/languages/ru-RU.min.js deleted file mode 100644 index 735f74e8..00000000 --- a/dist/min/languages/ru-RU.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : russian (ru) - * author : Anatoli Papirovski : https://github.com/apapirovski - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"руб.",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ru-RU",a)}(); \ No newline at end of file diff --git a/dist/min/languages/ru-UA.min.js b/dist/min/languages/ru-UA.min.js deleted file mode 100644 index 5549a0f4..00000000 --- a/dist/min/languages/ru-UA.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("ru-UA",a)}(); \ No newline at end of file diff --git a/dist/min/languages/sk-SK.min.js b/dist/min/languages/sk-SK.min.js deleted file mode 100644 index 9d3d7829..00000000 --- a/dist/min/languages/sk-SK.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : slovak (sk) - * author : Ahmed Al Hafoudh : http://www.freevision.sk - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("sk-SK",a)}(); \ No newline at end of file diff --git a/dist/min/languages/sv-SE.min.js b/dist/min/languages/sv-SE.min.js deleted file mode 100644 index 1daa8641..00000000 --- a/dist/min/languages/sv-SE.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : swedish - Sweden - * author : Benjamin Van Ryseghem (benjamin.vanryseghem.com) - */ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"M",billion:"md",trillion:"t"},currency:{symbol:"kr",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("sv-SE",a)}(); \ No newline at end of file diff --git a/dist/min/languages/th-TH.min.js b/dist/min/languages/th-TH.min.js deleted file mode 100644 index 6c1887f3..00000000 --- a/dist/min/languages/th-TH.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : thai (th) - * author : Sathit Jittanupat : https://github.com/jojosati - */ -!function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(a){return"."},currency:{symbol:"฿",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("th-TH",a)}(); \ No newline at end of file diff --git a/dist/min/languages/tr-TR.min.js b/dist/min/languages/tr-TR.min.js deleted file mode 100644 index 43f968bd..00000000 --- a/dist/min/languages/tr-TR.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : turkish (tr) - * author : Ecmel Ercan : https://github.com/ecmel, Erhan Gundogan : https://github.com/erhangundogan, Burak Yiğit Kaya: https://github.com/BYK - */ -!function(){var a={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},b={delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(b){if(0===b)return"'ıncı";var c=b%10,d=b%100-c,e=b>=100?100:null;return a[c]||a[d]||a[e]},currency:{symbol:"₺",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=b),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("tr-TR",b)}(); \ No newline at end of file diff --git a/dist/min/languages/uk-UA.min.js b/dist/min/languages/uk-UA.min.js deleted file mode 100644 index bae29eee..00000000 --- a/dist/min/languages/uk-UA.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var a={delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴",position:"postfix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:",0.00 $",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:",0 $"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("uk-UA",a)}(); \ No newline at end of file diff --git a/dist/min/languages/zh-CN.min.js b/dist/min/languages/zh-CN.min.js deleted file mode 100644 index 6cedf4ac..00000000 --- a/dist/min/languages/zh-CN.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * numbro.js language configuration - * language : simplified chinese - * author : badplum : https://github.com/badplum - */ -!function(){var a={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00",fullWithNoDecimals:"$ ,0"}};"undefined"!=typeof module&&module.exports&&(module.exports=a),"undefined"!=typeof window&&this.numbro&&this.numbro.language&&this.numbro.language("zh-CN",a)}(); \ No newline at end of file diff --git a/dist/min/numbro.min.js b/dist/min/numbro.min.js deleted file mode 100644 index 06ae5f26..00000000 --- a/dist/min/numbro.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * numbro.js - * version : 1.1.1 - * author : Företagsplatsen AB - * license : MIT - * http://www.foretagsplatsen.se - */ -(function(){function a(a){this._value=a}function b(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function c(a,b,c){var d;return d=b.indexOf("$")>-1?e(a,b,c):b.indexOf("%")>-1?f(a,b,c):b.indexOf(":")>-1?g(a,b):i(a._value,b,c)}function d(a,b){var c,d,e,f,g,i=b,j=["KB","MB","GB","TB","PB","EB","ZB","YB"],k=!1;if(b.indexOf(":")>-1)a._value=h(b);else if(b===q)a._value=0;else{for("."!==o[p].delimiters.decimal&&(b=b.replace(/\./g,"").replace(o[p].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+o[p].abbreviations.thousand+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+o[p].abbreviations.million+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+o[p].abbreviations.billion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+o[p].abbreviations.trillion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),g=0;g<=j.length&&!(k=b.indexOf(j[g])>-1?Math.pow(1024,g+1):!1);g++);a._value=(k?k:1)*(i.match(c)?Math.pow(10,3):1)*(i.match(d)?Math.pow(10,6):1)*(i.match(e)?Math.pow(10,9):1)*(i.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=k?Math.ceil(a._value):a._value}return a._value}function e(a,b,c){var d,e,f=b,g=f.indexOf("$"),h=f.indexOf("("),j=f.indexOf("-"),k="",l="";if(-1===f.indexOf("$")?"infix"===o[p].currency.position?(l=o[p].currency.symbol,o[p].currency.spaceSeparated&&(l=" "+l+" ")):o[p].currency.spaceSeparated&&(k=" "):f.indexOf(" $")>-1?(k=" ",f=f.replace(" $","")):f.indexOf("$ ")>-1?(k=" ",f=f.replace("$ ","")):f=f.replace("$",""),e=i(a._value,f,c,l),-1===b.indexOf("$"))switch(o[p].currency.position){case"postfix":e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;break;case"infix":break;default:e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=Math.max(h,j)+1,e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e}else 1>=g?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(h>g||j>g)&&(d=0),e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;return e}function f(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=i(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function g(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function h(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function i(a,c,d,e){var f,g,h,i,j,k,l,m,n,r,s,t,u,v,w=!1,x=!1,y=!1,z="",A=!1,B=!1,C=!1,D=!1,E=!1,F="",G="",H=Math.abs(a),I=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],J="",K=!1,L=!1,M=-1,N=-1,O="";if(0===a&&null!==q)return q;if(isFinite(a)){if(-1!==c.indexOf("-")&&(K=!0),c.indexOf("(")>-1?(w=!0,c=c.slice(1,-1)):c.indexOf("+")>-1&&(x=!0,c=c.replace(/\+/g,"")),c.indexOf("a")>-1){if(r=c.split(".")[0].match(/0/g)||[],r=r.length,A=c.indexOf("aK")>=0,B=c.indexOf("aM")>=0,C=c.indexOf("aB")>=0,D=c.indexOf("aT")>=0,E=A||B||C||D,c.indexOf(" a")>-1?(z=" ",c=c.replace(" a","")):c=c.replace("a",""),j=Math.floor(Math.log(H)/Math.LN10)+1,l=j%3,l=0===l?3:l,r>=l&&(k=Math.floor(Math.log(H)/Math.LN10)+1-r,m=3*~~((Math.min(r,j)-l)/3),H/=Math.pow(10,m),-1===c.indexOf(".")&&r>3))for(c+="[.]",v=0===k?0:3*~~(k/3)-k,v=0>v?v+3:v,f=0;v>f;f++)c+="0";Math.floor(Math.log(Math.abs(a))/Math.LN10)+1!==r&&(H>=Math.pow(10,12)&&!E||D?(z+=o[p].abbreviations.trillion,a/=Math.pow(10,12)):H=Math.pow(10,9)&&!E||C?(z+=o[p].abbreviations.billion,a/=Math.pow(10,9)):H=Math.pow(10,6)&&!E||B?(z+=o[p].abbreviations.million,a/=Math.pow(10,6)):(H=Math.pow(10,3)&&!E||A)&&(z+=o[p].abbreviations.thousand,a/=Math.pow(10,3)))}if(c.indexOf("b")>-1)for(c.indexOf(" b")>-1?(F=" ",c=c.replace(" b","")):c=c.replace("b",""),i=0;i<=I.length;i++)if(g=Math.pow(1024,i),h=Math.pow(1024,i+1),a>=g&&h>a){F+=I[i],g>0&&(a/=g);break}return c.indexOf("o")>-1&&(c.indexOf(" o")>-1?(G=" ",c=c.replace(" o","")):c=c.replace("o",""),G+=o[p].ordinal(a)),c.indexOf("[.]")>-1&&(y=!0,c=c.replace("[.]",".")),n=a.toString().split(".")[0],s=c.split(".")[1],u=c.indexOf(","),s?(s.indexOf("[")>-1?(s=s.replace("]",""),s=s.split("["),J=b(a,s[0].length+s[1].length,d,s[1].length)):J=b(a,s.length,d),n=J.split(".")[0],J.split(".")[1].length?(t=e?z+e:o[p].delimiters.decimal,J=t+J.split(".")[1]):J="",y&&0===Number(J.slice(1))&&(J="")):n=b(a,null,d),n.indexOf("-")>-1&&(n=n.slice(1),L=!0),u>-1&&(n=n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o[p].delimiters.thousands)),0===c.indexOf(".")&&(n=""),M=c.indexOf("("),N=c.indexOf("-"),O=N>M?(w&&L?"(":"")+(K&&L||!w&&L?"-":""):(K&&L||!w&&L?"-":"")+(w&&L?"(":""),O+(!L&&x?"+":"")+n+J+(G?G:"")+(z&&!e?z:"")+(F?F:"")+(w&&L?")":"")}return""+a}function j(a,b){o[a]=b}function k(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function l(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=k(a),d=k(b);return c>d?c:d},-(1/0))}var m,n="1.1.1",o={},p="en-US",q=null,r="0,0",s="0$",t="undefined"!=typeof module&&module.exports;m=function(b){return m.isNumbro(b)?b=b.value():0===b||"undefined"==typeof b?b=0:Number(b)||(b=m.fn.unformat(b)),new a(Number(b))},m.version=n,m.isNumbro=function(b){return b instanceof a},m.language=function(a,b){if(!a)return p;if(a&&!b){if(!o[a])throw new Error("Unknown language : "+a);p=a;var c=o[a].defaults;c&&c.format&&m.defaultFormat(c.format),c&&c.currencyFormat&&m.defaultCurrencyFormat(c.currencyFormat)}return(b||!o[a])&&j(a,b),m},m.setLanguage=function(a,b){var c=a,d=a.split("-")[0],e=null;o[c]||(Object.keys(o).forEach(function(a){e||a.split("-")[0]!==d||(e=a)}),c=e||b||"en-US"),m.language(c)},m.languageData=function(a){if(!a)return o[p];if(!o[a])throw new Error("Unknown language : "+a);return o[a]},m.language("en-US",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}}),m.languages=function(){return o},m.zeroFormat=function(a){q="string"==typeof a?a:null},m.defaultFormat=function(a){r="string"==typeof a?a:"0.0"},m.defaultCurrencyFormat=function(a){s="string"==typeof a?a:"0$"},m.validate=function(a,b){var c,d,e,f,g,h,i,j;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{i=m.languageData(b)}catch(k){i=m.languageData(m.language())}return e=i.currency.symbol,g=i.abbreviations,c=i.delimiters.decimal,d="."===i.delimiters.thousands?"\\.":i.delimiters.thousands,j=a.match(/^[^\d]+/),null!==j&&(a=a.substr(1),j[0]!==e)?!1:(j=a.match(/[^\d]+$/),null!==j&&(a=a.slice(0,-1),j[0]!==g.thousand&&j[0]!==g.million&&j[0]!==g.billion&&j[0]!==g.trillion)?!1:(h=new RegExp(d+"{2}"),a.match(/[^\d.,]/g)?!1:(f=a.split(c),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h):1===f[0].length?!!f[0].match(/^\d+$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),m.fn=a.prototype={clone:function(){return m(this)},format:function(a,b){return c(this,a?a:r,void 0!==b?b:Math.round)},formatCurrency:function(a,b){return e(this,a?a:s,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:d(this,a?a:r)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,d,e){return a+c*b}var c=l.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b,d,e){return a-c*b}var c=l.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b,c,d){var e=l(a,b);return a*e*b*e/(e*e)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b,c,d){var e=l(a,b);return a*e/(b*e)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(m(this._value).subtract(a).value())}},t&&(module.exports=m),"undefined"==typeof ender&&(this.numbro=m),"function"==typeof define&&define.amd&&define([],function(){return m})}).call(this); \ No newline at end of file diff --git a/dist/numbro.js b/dist/numbro.js index 4b1a4142..11251ba7 100644 --- a/dist/numbro.js +++ b/dist/numbro.js @@ -1,6 +1,6 @@ /*! * numbro.js - * version : 1.2.1 + * version : 1.2.2 * author : Företagsplatsen AB * license : MIT * http://www.foretagsplatsen.se @@ -14,7 +14,7 @@ ************************************/ var numbro, - VERSION = '1.2.1', + VERSION = '1.2.2', // internal storage for language config files languages = {}, currentLanguage = 'en-US', diff --git a/dist/numbro.min.js b/dist/numbro.min.js index c6bc838b..eaa31fa8 100644 --- a/dist/numbro.min.js +++ b/dist/numbro.min.js @@ -1,8 +1,8 @@ /*! * numbro.js - * version : 1.2.1 + * version : 1.2.2 * author : Företagsplatsen AB * license : MIT * http://www.foretagsplatsen.se */ -(function(){"use strict";function a(a){this._value=a}function b(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function c(a,b,c){var d;return d=b.indexOf("$")>-1?e(a,b,c):b.indexOf("%")>-1?f(a,b,c):b.indexOf(":")>-1?g(a,b):i(a._value,b,c)}function d(a,b){var c,d,e,f,g,i=b,j=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],k=["KB","MB","GB","TB","PB","EB","ZB","YB"],l=!1;if(b.indexOf(":")>-1)a._value=h(b);else if(b===q)a._value=0;else{for("."!==o[p].delimiters.decimal&&(b=b.replace(/\./g,"").replace(o[p].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+o[p].abbreviations.thousand+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+o[p].abbreviations.million+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+o[p].abbreviations.billion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+o[p].abbreviations.trillion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),g=0;g<=j.length&&!l;g++)b.indexOf(j[g])>-1?l=Math.pow(1024,g+1):b.indexOf(k[g])>-1&&(l=Math.pow(1e3,g+1));a._value=(l?l:1)*(i.match(c)?Math.pow(10,3):1)*(i.match(d)?Math.pow(10,6):1)*(i.match(e)?Math.pow(10,9):1)*(i.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=l?Math.ceil(a._value):a._value}return a._value}function e(a,b,c){var d,e,f=b,g=f.indexOf("$"),h=f.indexOf("("),j=f.indexOf("-"),k="",l="";if(-1===f.indexOf("$")?"infix"===o[p].currency.position?(l=o[p].currency.symbol,o[p].currency.spaceSeparated&&(l=" "+l+" ")):o[p].currency.spaceSeparated&&(k=" "):f.indexOf(" $")>-1?(k=" ",f=f.replace(" $","")):f.indexOf("$ ")>-1?(k=" ",f=f.replace("$ ","")):f=f.replace("$",""),e=i(a._value,f,c,l),-1===b.indexOf("$"))switch(o[p].currency.position){case"postfix":e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;break;case"infix":break;default:e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=Math.max(h,j)+1,e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e}else 1>=g?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(h>g||j>g)&&(d=0),e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;return e}function f(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=i(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function g(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function h(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function i(a,c,d,e){var f,g,h,i,j,k,l,m,n,r,s,t,u,v,w=!1,x=!1,y=!1,z="",A=!1,B=!1,C=!1,D=!1,E=!1,F="",G="",H=Math.abs(a),I=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],J=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],K="",L=!1,M=!1,N=-1,O=-1,P="";if(0===a&&null!==q)return q;if(isFinite(a)){if(-1!==c.indexOf("-")&&(L=!0),c.indexOf("(")>-1?(w=!0,c=c.slice(1,-1)):c.indexOf("+")>-1&&(x=!0,c=c.replace(/\+/g,"")),c.indexOf("a")>-1){if(r=c.split(".")[0].match(/0/g)||[],r=r.length,A=c.indexOf("aK")>=0,B=c.indexOf("aM")>=0,C=c.indexOf("aB")>=0,D=c.indexOf("aT")>=0,E=A||B||C||D,c.indexOf(" a")>-1?(z=" ",c=c.replace(" a","")):c=c.replace("a",""),j=Math.floor(Math.log(H)/Math.LN10)+1,l=j%3,l=0===l?3:l,r>=l&&(k=Math.floor(Math.log(H)/Math.LN10)+1-r,m=3*~~((Math.min(r,j)-l)/3),H/=Math.pow(10,m),-1===c.indexOf(".")&&r>3))for(c+="[.]",v=0===k?0:3*~~(k/3)-k,v=0>v?v+3:v,f=0;v>f;f++)c+="0";Math.floor(Math.log(Math.abs(a))/Math.LN10)+1!==r&&(H>=Math.pow(10,12)&&!E||D?(z+=o[p].abbreviations.trillion,a/=Math.pow(10,12)):H=Math.pow(10,9)&&!E||C?(z+=o[p].abbreviations.billion,a/=Math.pow(10,9)):H=Math.pow(10,6)&&!E||B?(z+=o[p].abbreviations.million,a/=Math.pow(10,6)):(H=Math.pow(10,3)&&!E||A)&&(z+=o[p].abbreviations.thousand,a/=Math.pow(10,3)))}if(c.indexOf("b")>-1)for(c.indexOf(" b")>-1?(F=" ",c=c.replace(" b","")):c=c.replace("b",""),i=0;i<=I.length;i++)if(g=Math.pow(1024,i),h=Math.pow(1024,i+1),a>=g&&h>a){F+=I[i],g>0&&(a/=g);break}if(c.indexOf("d")>-1)for(c.indexOf(" d")>-1?(F=" ",c=c.replace(" d","")):c=c.replace("d",""),i=0;i<=J.length;i++)if(g=Math.pow(1e3,i),h=Math.pow(1e3,i+1),a>=g&&h>a){F+=J[i],g>0&&(a/=g);break}return c.indexOf("o")>-1&&(c.indexOf(" o")>-1?(G=" ",c=c.replace(" o","")):c=c.replace("o",""),o[p].ordinal&&(G+=o[p].ordinal(a))),c.indexOf("[.]")>-1&&(y=!0,c=c.replace("[.]",".")),n=a.toString().split(".")[0],s=c.split(".")[1],u=c.indexOf(","),s?(s.indexOf("[")>-1?(s=s.replace("]",""),s=s.split("["),K=b(a,s[0].length+s[1].length,d,s[1].length)):K=b(a,s.length,d),n=K.split(".")[0],K.split(".")[1].length?(t=e?z+e:o[p].delimiters.decimal,K=t+K.split(".")[1]):K="",y&&0===Number(K.slice(1))&&(K="")):n=b(a,null,d),n.indexOf("-")>-1&&(n=n.slice(1),M=!0),u>-1&&(n=n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o[p].delimiters.thousands)),0===c.indexOf(".")&&(n=""),N=c.indexOf("("),O=c.indexOf("-"),P=O>N?(w&&M?"(":"")+(L&&M||!w&&M?"-":""):(L&&M||!w&&M?"-":"")+(w&&M?"(":""),P+(!M&&x?"+":"")+n+K+(G?G:"")+(z&&!e?z:"")+(F?F:"")+(w&&M?")":"")}return""+a}function j(a,b){o[a]=b}function k(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function l(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=k(a),d=k(b);return c>d?c:d},-(1/0))}var m,n="1.2.1",o={},p="en-US",q=null,r="0,0",s="0$",t="undefined"!=typeof module&&module.exports;m=function(b){return m.isNumbro(b)?b=b.value():0===b||"undefined"==typeof b?b=0:Number(b)||(b=m.fn.unformat(b)),new a(Number(b))},m.version=n,m.isNumbro=function(b){return b instanceof a},m.language=function(a,b){if(!a)return p;if(a&&!b){if(!o[a])throw new Error("Unknown language : "+a);p=a;var c=o[a].defaults;c&&c.format&&m.defaultFormat(c.format),c&&c.currencyFormat&&m.defaultCurrencyFormat(c.currencyFormat)}return(b||!o[a])&&j(a,b),m},m.setLanguage=function(a,b){var c=a,d=a.split("-")[0],e=null;o[c]||(Object.keys(o).forEach(function(a){e||a.split("-")[0]!==d||(e=a)}),c=e||b||"en-US"),m.language(c)},m.languageData=function(a){if(!a)return o[p];if(!o[a])throw new Error("Unknown language : "+a);return o[a]},m.language("en-US",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}}),m.languages=function(){return o},m.zeroFormat=function(a){q="string"==typeof a?a:null},m.defaultFormat=function(a){r="string"==typeof a?a:"0.0"},m.defaultCurrencyFormat=function(a){s="string"==typeof a?a:"0$"},m.validate=function(a,b){var c,d,e,f,g,h,i,j;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{i=m.languageData(b)}catch(k){i=m.languageData(m.language())}return e=i.currency.symbol,g=i.abbreviations,c=i.delimiters.decimal,d="."===i.delimiters.thousands?"\\.":i.delimiters.thousands,j=a.match(/^[^\d]+/),null!==j&&(a=a.substr(1),j[0]!==e)?!1:(j=a.match(/[^\d]+$/),null!==j&&(a=a.slice(0,-1),j[0]!==g.thousand&&j[0]!==g.million&&j[0]!==g.billion&&j[0]!==g.trillion)?!1:(h=new RegExp(d+"{2}"),a.match(/[^\d.,]/g)?!1:(f=a.split(c),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h):1===f[0].length?!!f[0].match(/^\d+$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),m.fn=a.prototype={clone:function(){return m(this)},format:function(a,b){return c(this,a?a:r,void 0!==b?b:Math.round)},formatCurrency:function(a,b){return e(this,a?a:s,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:d(this,a?a:r)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b){return a+c*b}var c=l.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b){return a-c*b}var c=l.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b){var c=l(a,b);return a*c*b*c/(c*c)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b){var c=l(a,b);return a*c/(b*c)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(m(this._value).subtract(a).value())}},t&&(module.exports=m),"undefined"==typeof ender&&(this.numbro=m),"function"==typeof define&&define.amd&&define([],function(){return m})}).call(this); \ No newline at end of file +(function(){"use strict";function a(a){this._value=a}function b(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function c(a,b,c){var d;return d=b.indexOf("$")>-1?e(a,b,c):b.indexOf("%")>-1?f(a,b,c):b.indexOf(":")>-1?g(a,b):i(a._value,b,c)}function d(a,b){var c,d,e,f,g,i=b,j=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],k=["KB","MB","GB","TB","PB","EB","ZB","YB"],l=!1;if(b.indexOf(":")>-1)a._value=h(b);else if(b===q)a._value=0;else{for("."!==o[p].delimiters.decimal&&(b=b.replace(/\./g,"").replace(o[p].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+o[p].abbreviations.thousand+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+o[p].abbreviations.million+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+o[p].abbreviations.billion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+o[p].abbreviations.trillion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),g=0;g<=j.length&&!l;g++)b.indexOf(j[g])>-1?l=Math.pow(1024,g+1):b.indexOf(k[g])>-1&&(l=Math.pow(1e3,g+1));a._value=(l?l:1)*(i.match(c)?Math.pow(10,3):1)*(i.match(d)?Math.pow(10,6):1)*(i.match(e)?Math.pow(10,9):1)*(i.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=l?Math.ceil(a._value):a._value}return a._value}function e(a,b,c){var d,e,f=b,g=f.indexOf("$"),h=f.indexOf("("),j=f.indexOf("-"),k="",l="";if(-1===f.indexOf("$")?"infix"===o[p].currency.position?(l=o[p].currency.symbol,o[p].currency.spaceSeparated&&(l=" "+l+" ")):o[p].currency.spaceSeparated&&(k=" "):f.indexOf(" $")>-1?(k=" ",f=f.replace(" $","")):f.indexOf("$ ")>-1?(k=" ",f=f.replace("$ ","")):f=f.replace("$",""),e=i(a._value,f,c,l),-1===b.indexOf("$"))switch(o[p].currency.position){case"postfix":e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;break;case"infix":break;default:e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=Math.max(h,j)+1,e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e}else 1>=g?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(h>g||j>g)&&(d=0),e.splice(d,0,o[p].currency.symbol+k),e=e.join("")):e=o[p].currency.symbol+k+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,k+o[p].currency.symbol),e=e.join("")):e=e+k+o[p].currency.symbol;return e}function f(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=i(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function g(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function h(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function i(a,c,d,e){var f,g,h,i,j,k,l,m,n,r,s,t,u,v,w=!1,x=!1,y=!1,z="",A=!1,B=!1,C=!1,D=!1,E=!1,F="",G="",H=Math.abs(a),I=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],J=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],K="",L=!1,M=!1,N=-1,O=-1,P="";if(0===a&&null!==q)return q;if(isFinite(a)){if(-1!==c.indexOf("-")&&(L=!0),c.indexOf("(")>-1?(w=!0,c=c.slice(1,-1)):c.indexOf("+")>-1&&(x=!0,c=c.replace(/\+/g,"")),c.indexOf("a")>-1){if(r=c.split(".")[0].match(/0/g)||[],r=r.length,A=c.indexOf("aK")>=0,B=c.indexOf("aM")>=0,C=c.indexOf("aB")>=0,D=c.indexOf("aT")>=0,E=A||B||C||D,c.indexOf(" a")>-1?(z=" ",c=c.replace(" a","")):c=c.replace("a",""),j=Math.floor(Math.log(H)/Math.LN10)+1,l=j%3,l=0===l?3:l,r>=l&&(k=Math.floor(Math.log(H)/Math.LN10)+1-r,m=3*~~((Math.min(r,j)-l)/3),H/=Math.pow(10,m),-1===c.indexOf(".")&&r>3))for(c+="[.]",v=0===k?0:3*~~(k/3)-k,v=0>v?v+3:v,f=0;v>f;f++)c+="0";Math.floor(Math.log(Math.abs(a))/Math.LN10)+1!==r&&(H>=Math.pow(10,12)&&!E||D?(z+=o[p].abbreviations.trillion,a/=Math.pow(10,12)):H=Math.pow(10,9)&&!E||C?(z+=o[p].abbreviations.billion,a/=Math.pow(10,9)):H=Math.pow(10,6)&&!E||B?(z+=o[p].abbreviations.million,a/=Math.pow(10,6)):(H=Math.pow(10,3)&&!E||A)&&(z+=o[p].abbreviations.thousand,a/=Math.pow(10,3)))}if(c.indexOf("b")>-1)for(c.indexOf(" b")>-1?(F=" ",c=c.replace(" b","")):c=c.replace("b",""),i=0;i<=I.length;i++)if(g=Math.pow(1024,i),h=Math.pow(1024,i+1),a>=g&&h>a){F+=I[i],g>0&&(a/=g);break}if(c.indexOf("d")>-1)for(c.indexOf(" d")>-1?(F=" ",c=c.replace(" d","")):c=c.replace("d",""),i=0;i<=J.length;i++)if(g=Math.pow(1e3,i),h=Math.pow(1e3,i+1),a>=g&&h>a){F+=J[i],g>0&&(a/=g);break}return c.indexOf("o")>-1&&(c.indexOf(" o")>-1?(G=" ",c=c.replace(" o","")):c=c.replace("o",""),o[p].ordinal&&(G+=o[p].ordinal(a))),c.indexOf("[.]")>-1&&(y=!0,c=c.replace("[.]",".")),n=a.toString().split(".")[0],s=c.split(".")[1],u=c.indexOf(","),s?(s.indexOf("[")>-1?(s=s.replace("]",""),s=s.split("["),K=b(a,s[0].length+s[1].length,d,s[1].length)):K=b(a,s.length,d),n=K.split(".")[0],K.split(".")[1].length?(t=e?z+e:o[p].delimiters.decimal,K=t+K.split(".")[1]):K="",y&&0===Number(K.slice(1))&&(K="")):n=b(a,null,d),n.indexOf("-")>-1&&(n=n.slice(1),M=!0),u>-1&&(n=n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o[p].delimiters.thousands)),0===c.indexOf(".")&&(n=""),N=c.indexOf("("),O=c.indexOf("-"),P=O>N?(w&&M?"(":"")+(L&&M||!w&&M?"-":""):(L&&M||!w&&M?"-":"")+(w&&M?"(":""),P+(!M&&x?"+":"")+n+K+(G?G:"")+(z&&!e?z:"")+(F?F:"")+(w&&M?")":"")}return""+a}function j(a,b){o[a]=b}function k(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function l(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=k(a),d=k(b);return c>d?c:d},-(1/0))}var m,n="1.2.2",o={},p="en-US",q=null,r="0,0",s="0$",t="undefined"!=typeof module&&module.exports;m=function(b){return m.isNumbro(b)?b=b.value():0===b||"undefined"==typeof b?b=0:Number(b)||(b=m.fn.unformat(b)),new a(Number(b))},m.version=n,m.isNumbro=function(b){return b instanceof a},m.language=function(a,b){if(!a)return p;if(a&&!b){if(!o[a])throw new Error("Unknown language : "+a);p=a;var c=o[a].defaults;c&&c.format&&m.defaultFormat(c.format),c&&c.currencyFormat&&m.defaultCurrencyFormat(c.currencyFormat)}return(b||!o[a])&&j(a,b),m},m.setLanguage=function(a,b){var c=a,d=a.split("-")[0],e=null;o[c]||(Object.keys(o).forEach(function(a){e||a.split("-")[0]!==d||(e=a)}),c=e||b||"en-US"),m.language(c)},m.languageData=function(a){if(!a)return o[p];if(!o[a])throw new Error("Unknown language : "+a);return o[a]},m.language("en-US",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}}),m.languages=function(){return o},m.zeroFormat=function(a){q="string"==typeof a?a:null},m.defaultFormat=function(a){r="string"==typeof a?a:"0.0"},m.defaultCurrencyFormat=function(a){s="string"==typeof a?a:"0$"},m.validate=function(a,b){var c,d,e,f,g,h,i,j;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{i=m.languageData(b)}catch(k){i=m.languageData(m.language())}return e=i.currency.symbol,g=i.abbreviations,c=i.delimiters.decimal,d="."===i.delimiters.thousands?"\\.":i.delimiters.thousands,j=a.match(/^[^\d]+/),null!==j&&(a=a.substr(1),j[0]!==e)?!1:(j=a.match(/[^\d]+$/),null!==j&&(a=a.slice(0,-1),j[0]!==g.thousand&&j[0]!==g.million&&j[0]!==g.billion&&j[0]!==g.trillion)?!1:(h=new RegExp(d+"{2}"),a.match(/[^\d.,]/g)?!1:(f=a.split(c),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h):1===f[0].length?!!f[0].match(/^\d+$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),m.fn=a.prototype={clone:function(){return m(this)},format:function(a,b){return c(this,a?a:r,void 0!==b?b:Math.round)},formatCurrency:function(a,b){return e(this,a?a:s,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:d(this,a?a:r)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b){return a+c*b}var c=l.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b){return a-c*b}var c=l.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b){var c=l(a,b);return a*c*b*c/(c*c)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b){var c=l(a,b);return a*c/(b*c)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(m(this._value).subtract(a).value())}},t&&(module.exports=m),"undefined"==typeof ender&&(this.numbro=m),"function"==typeof define&&define.amd&&define([],function(){return m})}).call(this); \ No newline at end of file diff --git a/numbro.js b/numbro.js index 4b1a4142..11251ba7 100644 --- a/numbro.js +++ b/numbro.js @@ -1,6 +1,6 @@ /*! * numbro.js - * version : 1.2.1 + * version : 1.2.2 * author : Företagsplatsen AB * license : MIT * http://www.foretagsplatsen.se @@ -14,7 +14,7 @@ ************************************/ var numbro, - VERSION = '1.2.1', + VERSION = '1.2.2', // internal storage for language config files languages = {}, currentLanguage = 'en-US', diff --git a/package.json b/package.json index eef6d6f0..e9201cb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "numbro", - "version": "1.2.1", + "version": "1.2.2", "description": "Format and manipulate numbers.", "homepage": "http://numbrojs.com", "author": {