numeral-lts 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/locales/en-ie.js +36 -0
- package/locales/zh-tw.js +32 -0
- package/locales.js +49 -1
- package/min/locales/bg.min.js +1 -1
- package/min/locales/chs.min.js +1 -1
- package/min/locales/cs.min.js +1 -1
- package/min/locales/da-dk.min.js +1 -1
- package/min/locales/de-ch.min.js +1 -1
- package/min/locales/de.min.js +1 -1
- package/min/locales/en-au.min.js +1 -1
- package/min/locales/en-gb.min.js +1 -1
- package/min/locales/en-ie.min.js +1 -0
- package/min/locales/en-za.min.js +1 -1
- package/min/locales/es-es.min.js +1 -1
- package/min/locales/es.min.js +1 -1
- package/min/locales/et.min.js +1 -1
- package/min/locales/fi.min.js +1 -1
- package/min/locales/fr-ca.min.js +1 -1
- package/min/locales/fr-ch.min.js +1 -1
- package/min/locales/fr.min.js +1 -1
- package/min/locales/hu.min.js +1 -1
- package/min/locales/id.min.js +1 -1
- package/min/locales/it.min.js +1 -1
- package/min/locales/ja.min.js +1 -1
- package/min/locales/lv.min.js +1 -1
- package/min/locales/nl-be.min.js +1 -1
- package/min/locales/nl-nl.min.js +1 -1
- package/min/locales/no.min.js +1 -1
- package/min/locales/pl.min.js +1 -1
- package/min/locales/pt-br.min.js +1 -1
- package/min/locales/pt-pt.min.js +1 -1
- package/min/locales/ro.min.js +1 -1
- package/min/locales/ru-ua.min.js +1 -1
- package/min/locales/ru.min.js +1 -1
- package/min/locales/sk.min.js +1 -1
- package/min/locales/sl.min.js +1 -1
- package/min/locales/sv-se.min.js +1 -1
- package/min/locales/th.min.js +1 -1
- package/min/locales/tr.min.js +1 -1
- package/min/locales/uk-ua.min.js +1 -1
- package/min/locales/vi.min.js +1 -1
- package/min/locales/zh-tw.min.js +1 -0
- package/min/locales.min.js +1 -7
- package/min/numeral.min.js +1 -8
- package/numeral.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,6 +73,12 @@ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/mast
|
|
|
73
73
|
|
|
74
74
|
# Changelog
|
|
75
75
|
|
|
76
|
+
### Unreleased
|
|
77
|
+
|
|
78
|
+
Added: Irish English locale `en-ie` (en-gb delimiters, abbreviations and ordinals with currency `€`); before, `numeral.localeData('en-ie')` threw `Unknown locale : en-ie`
|
|
79
|
+
|
|
80
|
+
Added: Traditional Chinese locale `zh-tw` (currency `NT$`, abbreviations 千/百萬/十億/兆); before, `numeral.localeData('zh-tw')` threw `Unknown locale : zh-tw`
|
|
81
|
+
|
|
76
82
|
### 2.1.0 (first release as `numeral-lts`)
|
|
77
83
|
|
|
78
84
|
Published as `numeral-lts` on npm; the API is the same as `numeral` 2.0.6. Pull request numbers refer to https://github.com/cyberpusa-ai/Numeral-js.
|
package/locales/en-ie.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// numeral.js locale configuration
|
|
2
|
+
// locale : english ireland (ie)
|
|
3
|
+
// author : dmccanny : https://github.com/dmccanny
|
|
4
|
+
|
|
5
|
+
(function (global, factory) {
|
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
|
7
|
+
define(['../numeral'], factory);
|
|
8
|
+
} else if (typeof module === 'object' && module.exports) {
|
|
9
|
+
factory(require('../numeral'));
|
|
10
|
+
} else {
|
|
11
|
+
factory(global.numeral);
|
|
12
|
+
}
|
|
13
|
+
}(this, function (numeral) {
|
|
14
|
+
numeral.register('locale', 'en-ie', {
|
|
15
|
+
delimiters: {
|
|
16
|
+
thousands: ',',
|
|
17
|
+
decimal: '.'
|
|
18
|
+
},
|
|
19
|
+
abbreviations: {
|
|
20
|
+
thousand: 'k',
|
|
21
|
+
million: 'm',
|
|
22
|
+
billion: 'b',
|
|
23
|
+
trillion: 't'
|
|
24
|
+
},
|
|
25
|
+
ordinal: function (number) {
|
|
26
|
+
var b = number % 10;
|
|
27
|
+
return (~~ (number % 100 / 10) === 1) ? 'th' :
|
|
28
|
+
(b === 1) ? 'st' :
|
|
29
|
+
(b === 2) ? 'nd' :
|
|
30
|
+
(b === 3) ? 'rd' : 'th';
|
|
31
|
+
},
|
|
32
|
+
currency: {
|
|
33
|
+
symbol: '€'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}));
|
package/locales/zh-tw.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// numeral.js locale configuration
|
|
2
|
+
// locale : traditional chinese (zh-tw)
|
|
3
|
+
// author : sufuf3 : https://github.com/sufuf3
|
|
4
|
+
|
|
5
|
+
(function (global, factory) {
|
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
|
7
|
+
define(['../numeral'], factory);
|
|
8
|
+
} else if (typeof module === 'object' && module.exports) {
|
|
9
|
+
factory(require('../numeral'));
|
|
10
|
+
} else {
|
|
11
|
+
factory(global.numeral);
|
|
12
|
+
}
|
|
13
|
+
}(this, function (numeral) {
|
|
14
|
+
numeral.register('locale', 'zh-tw', {
|
|
15
|
+
delimiters: {
|
|
16
|
+
thousands: ',',
|
|
17
|
+
decimal: '.'
|
|
18
|
+
},
|
|
19
|
+
abbreviations: {
|
|
20
|
+
thousand: '千',
|
|
21
|
+
million: '百萬',
|
|
22
|
+
billion: '十億',
|
|
23
|
+
trillion: '兆'
|
|
24
|
+
},
|
|
25
|
+
ordinal: function (number) {
|
|
26
|
+
return '.';
|
|
27
|
+
},
|
|
28
|
+
currency: {
|
|
29
|
+
symbol: 'NT$'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}));
|
package/locales.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @preserve
|
|
2
2
|
* numeral.js
|
|
3
|
-
* locales : 2.1.
|
|
3
|
+
* locales : 2.1.1
|
|
4
4
|
* license : MIT
|
|
5
5
|
* http://adamwdraper.github.com/Numeral-js/
|
|
6
6
|
*/
|
|
@@ -208,6 +208,32 @@
|
|
|
208
208
|
})();
|
|
209
209
|
|
|
210
210
|
|
|
211
|
+
(function() {
|
|
212
|
+
numeral.register('locale', 'en-ie', {
|
|
213
|
+
delimiters: {
|
|
214
|
+
thousands: ',',
|
|
215
|
+
decimal: '.'
|
|
216
|
+
},
|
|
217
|
+
abbreviations: {
|
|
218
|
+
thousand: 'k',
|
|
219
|
+
million: 'm',
|
|
220
|
+
billion: 'b',
|
|
221
|
+
trillion: 't'
|
|
222
|
+
},
|
|
223
|
+
ordinal: function (number) {
|
|
224
|
+
var b = number % 10;
|
|
225
|
+
return (~~ (number % 100 / 10) === 1) ? 'th' :
|
|
226
|
+
(b === 1) ? 'st' :
|
|
227
|
+
(b === 2) ? 'nd' :
|
|
228
|
+
(b === 3) ? 'rd' : 'th';
|
|
229
|
+
},
|
|
230
|
+
currency: {
|
|
231
|
+
symbol: '€'
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
})();
|
|
235
|
+
|
|
236
|
+
|
|
211
237
|
(function() {
|
|
212
238
|
numeral.register('locale', 'en-za', {
|
|
213
239
|
delimiters: {
|
|
@@ -912,4 +938,26 @@
|
|
|
912
938
|
})();
|
|
913
939
|
|
|
914
940
|
|
|
941
|
+
(function() {
|
|
942
|
+
numeral.register('locale', 'zh-tw', {
|
|
943
|
+
delimiters: {
|
|
944
|
+
thousands: ',',
|
|
945
|
+
decimal: '.'
|
|
946
|
+
},
|
|
947
|
+
abbreviations: {
|
|
948
|
+
thousand: '千',
|
|
949
|
+
million: '百萬',
|
|
950
|
+
billion: '十億',
|
|
951
|
+
trillion: '兆'
|
|
952
|
+
},
|
|
953
|
+
ordinal: function (number) {
|
|
954
|
+
return '.';
|
|
955
|
+
},
|
|
956
|
+
currency: {
|
|
957
|
+
symbol: 'NT$'
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
})();
|
|
961
|
+
|
|
962
|
+
|
|
915
963
|
}));
|
package/min/locales/bg.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","bg",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"хил",million:"млн",billion:"млрд",trillion:"трлн"},ordinal:function(e){return""},currency:{symbol:"лв"}})});
|
package/min/locales/chs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","chs",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(e){return"."},currency:{symbol:"¥"}})});
|
package/min/locales/cs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","cs",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč"}})});
|
package/min/locales/da-dk.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","da-dk",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(e){return"."},currency:{symbol:"DKK"}})});
|
package/min/locales/de-ch.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","de-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"."},currency:{symbol:"CHF"}})});
|
package/min/locales/de.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","de",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"."},currency:{symbol:"€"}})});
|
package/min/locales/en-au.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","en-au",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var n=e%10;return 1==~~(e%100/10)?"th":1==n?"st":2==n?"nd":3==n?"rd":"th"},currency:{symbol:"$"}})});
|
package/min/locales/en-gb.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","en-gb",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var n=e%10;return 1==~~(e%100/10)?"th":1==n?"st":2==n?"nd":3==n?"rd":"th"},currency:{symbol:"£"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","en-ie",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var n=e%10;return 1==~~(e%100/10)?"th":1==n?"st":2==n?"nd":3==n?"rd":"th"},currency:{symbol:"€"}})});
|
package/min/locales/en-za.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","en-za",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var n=e%10;return 1==~~(e%100/10)?"th":1==n?"st":2==n?"nd":3==n?"rd":"th"},currency:{symbol:"R"}})});
|
package/min/locales/es-es.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,o)=>{"function"==typeof define&&define.amd?define(["../numeral"],o):"object"==typeof module&&module.exports?o(require("../numeral")):o(e.numeral)})(this,function(e){e.register("locale","es-es",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(e){e%=10;return 1==e||3==e?"er":2==e?"do":7==e||0==e?"mo":8==e?"vo":9==e?"no":"to"},currency:{symbol:"€"}})});
|
package/min/locales/es.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,o)=>{"function"==typeof define&&define.amd?define(["../numeral"],o):"object"==typeof module&&module.exports?o(require("../numeral")):o(e.numeral)})(this,function(e){e.register("locale","es",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(e){e%=10;return 1==e||3==e?"er":2==e?"do":7==e||0==e?"mo":8==e?"vo":9==e?"no":"to"},currency:{symbol:"$"}})});
|
package/min/locales/et.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","et",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(e){return"."},currency:{symbol:"€"}})});
|
package/min/locales/fi.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","fi",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(e){return"."},currency:{symbol:"€"}})});
|
package/min/locales/fr-ca.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","fr-ca",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"$"}})});
|
package/min/locales/fr-ch.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","fr-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"CHF"}})});
|
package/min/locales/fr.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","fr",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return 1===e?"er":"e"},currency:{symbol:"€"}})});
|
package/min/locales/hu.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","hu",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(e){return"."},currency:{symbol:" Ft"}})});
|
package/min/locales/id.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","id",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"rb",million:"jt",billion:"M",trillion:"T"},ordinal:function(e){return""},currency:{symbol:"Rp"}})});
|
package/min/locales/it.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","it",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"€"}})});
|
package/min/locales/ja.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","ja",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(e){return"."},currency:{symbol:"¥"}})});
|
package/min/locales/lv.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","lv",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tūkst.",million:" milj.",billion:" mljrd.",trillion:" trilj."},ordinal:function(e){return"."},currency:{symbol:"€"}})});
|
package/min/locales/nl-be.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","nl-be",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:" mln",billion:" mld",trillion:" bln"},ordinal:function(e){var n=e%100;return 0!==e&&n<=1||8==n||20<=n?"ste":"de"},currency:{symbol:"€ "}})});
|
package/min/locales/nl-nl.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","nl-nl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(e){var n=e%100;return 0!==e&&n<=1||8==n||20<=n?"ste":"de"},currency:{symbol:"€ "}})});
|
package/min/locales/no.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","no",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"."},currency:{symbol:"kr"}})});
|
package/min/locales/pl.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","pl",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(e){return"."},currency:{symbol:"PLN"}})});
|
package/min/locales/pt-br.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","pt-br",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"R$"}})});
|
package/min/locales/pt-pt.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","pt-pt",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){return"º"},currency:{symbol:"€"}})});
|
package/min/locales/ro.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","ro",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"K",million:"mil.",billion:"mld.",trillion:"tril."},ordinal:function(e){return 1===e?"":"-lea"},currency:{symbol:"lei"}})});
|
package/min/locales/ru-ua.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","ru-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴"}})});
|
package/min/locales/ru.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","ru",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн.",billion:"млрд.",trillion:"трлн."},ordinal:function(){return"."},currency:{symbol:"руб."}})});
|
package/min/locales/sk.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","sk",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€"}})});
|
package/min/locales/sl.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","sl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mrd",trillion:"trilijon"},ordinal:function(){return"."},currency:{symbol:"€"}})});
|
package/min/locales/sv-se.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","sv-se",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"mn",billion:"md",trillion:"bn"},ordinal:function(e){var n=e%10;return 1!=~~(e%100/10)&&(1==n||2==n)?":a":":e"},currency:{symbol:"kr"}})});
|
package/min/locales/th.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","th",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(e){return"."},currency:{symbol:"฿"}})});
|
package/min/locales/tr.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((n,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(n.numeral)})(this,function(n){var c={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ı"};n.register("locale","tr",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(n){var i;return 0===n?"'ıncı":c[i=n%10]||c[n%100-i]||c[100<=n?100:null]},currency:{symbol:"₺"}})});
|
package/min/locales/uk-ua.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","uk-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴"}})});
|
package/min/locales/vi.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
((e,n)=>{"function"==typeof define&&define.amd?define(["../numeral"],n):"object"==typeof module&&module.exports?n(require("../numeral")):n(e.numeral)})(this,function(e){e.register("locale","vi",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:" nghìn",million:" triệu",billion:" tỷ",trillion:" nghìn tỷ"},ordinal:function(){return"."},currency:{symbol:"₫"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
((e,i)=>{"function"==typeof define&&define.amd?define(["../numeral"],i):"object"==typeof module&&module.exports?i(require("../numeral")):i(e.numeral)})(this,function(e){e.register("locale","zh-tw",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百萬",billion:"十億",trillion:"兆"},ordinal:function(e){return"."},currency:{symbol:"NT$"}})});
|
package/min/locales.min.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* numeral.js
|
|
3
|
-
* locales : 2.1.0
|
|
4
|
-
* license : MIT
|
|
5
|
-
* http://adamwdraper.github.com/Numeral-js/
|
|
6
|
-
*/
|
|
7
|
-
!function(a,b){"function"==typeof define&&define.amd?define(["numeral"],b):b("object"==typeof module&&module.exports?require("./numeral"):a.numeral)}(this,function(a){!function(){a.register("locale","bg",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"хил",million:"млн",billion:"млрд",trillion:"трлн"},ordinal:function(a){return""},currency:{symbol:"лв"}})}(),function(){a.register("locale","chs",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥"}})}(),function(){a.register("locale","cs",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč"}})}(),function(){a.register("locale","da-dk",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(a){return"."},currency:{symbol:"DKK"}})}(),function(){a.register("locale","de-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"CHF"}})}(),function(){a.register("locale","de",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","en-au",{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:"$"}})}(),function(){a.register("locale","en-gb",{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:"£"}})}(),function(){a.register("locale","en-za",{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:"R"}})}(),function(){a.register("locale","es-es",{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:"€"}})}(),function(){a.register("locale","es",{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:"$"}})}(),function(){a.register("locale","et",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(a){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","fi",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","fr-ca",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"$"}})}(),function(){a.register("locale","fr-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"CHF"}})}(),function(){a.register("locale","fr",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return 1===a?"er":"e"},currency:{symbol:"€"}})}(),function(){a.register("locale","hu",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(a){return"."},currency:{symbol:" Ft"}})}(),function(){a.register("locale","id",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"rb",million:"jt",billion:"M",trillion:"T"},ordinal:function(a){return""},currency:{symbol:"Rp"}})}(),function(){a.register("locale","it",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€"}})}(),function(){a.register("locale","ja",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(a){return"."},currency:{symbol:"¥"}})}(),function(){a.register("locale","lv",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tūkst.",million:" milj.",billion:" mljrd.",trillion:" trilj."},ordinal:function(a){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","nl-be",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:" mln",billion:" mld",trillion:" bln"},ordinal:function(a){var b=a%100;return 0!==a&&b<=1||8===b||b>=20?"ste":"de"},currency:{symbol:"€ "}})}(),function(){a.register("locale","nl-nl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(a){var b=a%100;return 0!==a&&b<=1||8===b||b>=20?"ste":"de"},currency:{symbol:"€ "}})}(),function(){a.register("locale","no",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"."},currency:{symbol:"kr"}})}(),function(){a.register("locale","pl",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(a){return"."},currency:{symbol:"PLN"}})}(),function(){a.register("locale","pt-br",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"R$"}})}(),function(){a.register("locale","pt-pt",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){return"º"},currency:{symbol:"€"}})}(),function(){a.register("locale","ro",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"K",million:"mil.",billion:"mld.",trillion:"tril."},ordinal:function(a){return 1===a?"":"-lea"},currency:{symbol:"lei"}})}(),function(){a.register("locale","ru-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴"}})}(),function(){a.register("locale","ru",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн.",billion:"млрд.",trillion:"трлн."},ordinal:function(){return"."},currency:{symbol:"руб."}})}(),function(){a.register("locale","sk",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","sl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mrd",trillion:"trilijon"},ordinal:function(){return"."},currency:{symbol:"€"}})}(),function(){a.register("locale","sv-se",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"mn",billion:"md",trillion:"bn"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?":e":1===b||2===b?":a":":e"},currency:{symbol:"kr"}})}(),function(){a.register("locale","th",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(a){return"."},currency:{symbol:"฿"}})}(),function(){var b={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ı"};a.register("locale","tr",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(a){if(0===a)return"'ıncı";var c=a%10,d=a%100-c,e=a>=100?100:null;return b[c]||b[d]||b[e]},currency:{symbol:"₺"}})}(),function(){a.register("locale","uk-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴"}})}(),function(){a.register("locale","vi",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:" nghìn",million:" triệu",billion:" tỷ",trillion:" nghìn tỷ"},ordinal:function(){return"."},currency:{symbol:"₫"}})}()});
|
|
1
|
+
((i,l)=>{"function"==typeof define&&define.amd?define(["numeral"],l):"object"==typeof module&&module.exports?l(require("./numeral")):l(i.numeral)})(this,function(i){var n;i.register("locale","bg",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"хил",million:"млн",billion:"млрд",trillion:"трлн"},ordinal:function(i){return""},currency:{symbol:"лв"}}),i.register("locale","chs",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十亿",trillion:"兆"},ordinal:function(i){return"."},currency:{symbol:"¥"}}),i.register("locale","cs",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"Kč"}}),i.register("locale","da-dk",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mia",trillion:"b"},ordinal:function(i){return"."},currency:{symbol:"DKK"}}),i.register("locale","de-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return"."},currency:{symbol:"CHF"}}),i.register("locale","de",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return"."},currency:{symbol:"€"}}),i.register("locale","en-au",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){var l=i%10;return 1==~~(i%100/10)?"th":1==l?"st":2==l?"nd":3==l?"rd":"th"},currency:{symbol:"$"}}),i.register("locale","en-gb",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){var l=i%10;return 1==~~(i%100/10)?"th":1==l?"st":2==l?"nd":3==l?"rd":"th"},currency:{symbol:"£"}}),i.register("locale","en-ie",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){var l=i%10;return 1==~~(i%100/10)?"th":1==l?"st":2==l?"nd":3==l?"rd":"th"},currency:{symbol:"€"}}),i.register("locale","en-za",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){var l=i%10;return 1==~~(i%100/10)?"th":1==l?"st":2==l?"nd":3==l?"rd":"th"},currency:{symbol:"R"}}),i.register("locale","es-es",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(i){i%=10;return 1==i||3==i?"er":2==i?"do":7==i||0==i?"mo":8==i?"vo":9==i?"no":"to"},currency:{symbol:"€"}}),i.register("locale","es",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mm",billion:"b",trillion:"t"},ordinal:function(i){i%=10;return 1==i||3==i?"er":2==i?"do":7==i||0==i?"mo":8==i?"vo":9==i?"no":"to"},currency:{symbol:"$"}}),i.register("locale","et",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tuh",million:" mln",billion:" mld",trillion:" trl"},ordinal:function(i){return"."},currency:{symbol:"€"}}),i.register("locale","fi",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(i){return"."},currency:{symbol:"€"}}),i.register("locale","fr-ca",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"M",billion:"G",trillion:"T"},ordinal:function(i){return 1===i?"er":"e"},currency:{symbol:"$"}}),i.register("locale","fr-ch",{delimiters:{thousands:"'",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return 1===i?"er":"e"},currency:{symbol:"CHF"}}),i.register("locale","fr",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return 1===i?"er":"e"},currency:{symbol:"€"}}),i.register("locale","hu",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"E",million:"M",billion:"Mrd",trillion:"T"},ordinal:function(i){return"."},currency:{symbol:" Ft"}}),i.register("locale","id",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"rb",million:"jt",billion:"M",trillion:"T"},ordinal:function(i){return""},currency:{symbol:"Rp"}}),i.register("locale","it",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mila",million:"mil",billion:"b",trillion:"t"},ordinal:function(i){return"º"},currency:{symbol:"€"}}),i.register("locale","ja",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百万",billion:"十億",trillion:"兆"},ordinal:function(i){return"."},currency:{symbol:"¥"}}),i.register("locale","lv",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:" tūkst.",million:" milj.",billion:" mljrd.",trillion:" trilj."},ordinal:function(i){return"."},currency:{symbol:"€"}}),i.register("locale","nl-be",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:" mln",billion:" mld",trillion:" bln"},ordinal:function(i){var l=i%100;return 0!==i&&l<=1||8==l||20<=l?"ste":"de"},currency:{symbol:"€ "}}),i.register("locale","nl-nl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mln",billion:"mrd",trillion:"bln"},ordinal:function(i){var l=i%100;return 0!==i&&l<=1||8==l||20<=l?"ste":"de"},currency:{symbol:"€ "}}),i.register("locale","no",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return"."},currency:{symbol:"kr"}}),i.register("locale","pl",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tys.",million:"mln",billion:"mld",trillion:"bln"},ordinal:function(i){return"."},currency:{symbol:"PLN"}}),i.register("locale","pt-br",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"mil",million:"milhões",billion:"b",trillion:"t"},ordinal:function(i){return"º"},currency:{symbol:"R$"}}),i.register("locale","pt-pt",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(i){return"º"},currency:{symbol:"€"}}),i.register("locale","ro",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"K",million:"mil.",billion:"mld.",trillion:"tril."},ordinal:function(i){return 1===i?"":"-lea"},currency:{symbol:"lei"}}),i.register("locale","ru-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"₴"}}),i.register("locale","ru",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тыс.",million:"млн.",billion:"млрд.",trillion:"трлн."},ordinal:function(){return"."},currency:{symbol:"руб."}}),i.register("locale","sk",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"tis.",million:"mil.",billion:"b",trillion:"t"},ordinal:function(){return"."},currency:{symbol:"€"}}),i.register("locale","sl",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"k",million:"mio",billion:"mrd",trillion:"trilijon"},ordinal:function(){return"."},currency:{symbol:"€"}}),i.register("locale","sv-se",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"t",million:"mn",billion:"md",trillion:"bn"},ordinal:function(i){var l=i%10;return 1!=~~(i%100/10)&&(1==l||2==l)?":a":":e"},currency:{symbol:"kr"}}),i.register("locale","th",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"พัน",million:"ล้าน",billion:"พันล้าน",trillion:"ล้านล้าน"},ordinal:function(i){return"."},currency:{symbol:"฿"}}),n={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ı"},i.register("locale","tr",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:"bin",million:"milyon",billion:"milyar",trillion:"trilyon"},ordinal:function(i){var l;return 0===i?"'ıncı":n[l=i%10]||n[i%100-l]||n[100<=i?100:null]},currency:{symbol:"₺"}}),i.register("locale","uk-ua",{delimiters:{thousands:" ",decimal:","},abbreviations:{thousand:"тис.",million:"млн",billion:"млрд",trillion:"блн"},ordinal:function(){return""},currency:{symbol:"₴"}}),i.register("locale","vi",{delimiters:{thousands:".",decimal:","},abbreviations:{thousand:" nghìn",million:" triệu",billion:" tỷ",trillion:" nghìn tỷ"},ordinal:function(){return"."},currency:{symbol:"₫"}}),i.register("locale","zh-tw",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"千",million:"百萬",billion:"十億",trillion:"兆"},ordinal:function(i){return"."},currency:{symbol:"NT$"}})});
|
package/min/numeral.min.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
/*! @preserve
|
|
2
|
-
* numeral.js
|
|
3
|
-
* version : 2.1.0
|
|
4
|
-
* author : Adam Draper
|
|
5
|
-
* license : MIT
|
|
6
|
-
* http://adamwdraper.github.com/Numeral-js/
|
|
7
|
-
*/
|
|
8
|
-
!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof module&&module.exports?module.exports=b():a.numeral=b()}(this,function(){function a(a,b){this._input=a,this._value=b}var b,c,d="2.1.0",e={},f={},g={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},h={currentLocale:g.currentLocale,zeroFormat:g.zeroFormat,nullFormat:g.nullFormat,defaultFormat:g.defaultFormat,scalePercentBy100:g.scalePercentBy100};return b=function(d){var f,g,i,j;if(b.isNumeral(d))f=d.value();else if(0===d||"undefined"==typeof d)f=0;else if(null===d||c.isNaN(d))f=null;else if("string"==typeof d)if(h.zeroFormat&&d===h.zeroFormat)f=0;else if(h.nullFormat&&d===h.nullFormat||!d.replace(/[^0-9]+/g,"").length)f=null;else{for(g in e)if(j="function"==typeof e[g].regexps.unformat?e[g].regexps.unformat():e[g].regexps.unformat,j&&d.match(j)){i=e[g].unformat;break}i=i||b._.stringToNumber,f=i(d)}else f=Number(d)||null;return new a(d,f)},b.version=d,b.isNumeral=function(b){return b instanceof a},b._=c={numberToFormat:function(a,c,d){var e,f,g,h,i,j,k=b.localeData(),l=!1,m=!1,n=0,o="",p=1e12,q=1e9,r=1e6,s=1e3,t="",u=!1,v=-1,w=!1;if(a=a||0,f=Math.abs(a),b._.includes(c,"(")?(l=!0,c=c.replace(/[\(|\)]/g,"")):(b._.includes(c,"+")||b._.includes(c,"-"))&&(w=b._.includes(c,"+"),v=w?c.indexOf("+"):a<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),b._.includes(c,"a")&&(e=c.match(/a(k|m|b|t)?/),e=!!e&&e[1],b._.includes(c," a")&&(o=" "),c=c.replace(new RegExp(o+"a[kmbt]?"),""),f>=p&&!e||"t"===e?(o+=k.abbreviations.trillion,a/=p):f<p&&f>=q&&!e||"b"===e?(o+=k.abbreviations.billion,a/=q):f<q&&f>=r&&!e||"m"===e?(o+=k.abbreviations.million,a/=r):(f<r&&f>=s&&!e||"k"===e)&&(o+=k.abbreviations.thousand,a/=s)),b._.includes(c,"[.]")&&(m=!0,c=c.replace("[.]",".")),g=a.toString().split(".")[0],h=c.split(".")[1],i=c.indexOf(","),n=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,h?(h=h.replace(/^\s+|\s+$/g,""),b._.includes(h,"[")?(h=h.replace("]",""),h=h.split("["),t=b._.toFixed(a,h[0].length+h[1].length,d,h[1].length)):t=b._.toFixed(a,h.length,d),g=t.split(".")[0],t=b._.includes(t,".")?k.delimiters.decimal+t.split(".")[1]:"",m&&0===Number(t.slice(1))&&(t="")):g=b._.toFixed(a,0,d),o&&!e&&Number(g)>=1e3&&o!==k.abbreviations.trillion)switch(g=String(Number(g)/1e3),o){case k.abbreviations.thousand:o=k.abbreviations.million;break;case k.abbreviations.million:o=k.abbreviations.billion;break;case k.abbreviations.billion:o=k.abbreviations.trillion}if(b._.includes(g,"-")&&(g=g.slice(1),u=!0),g.length<n)for(var x=n-g.length;x>0;x--)g="0"+g;return i>-1&&(g=g.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+k.delimiters.thousands)),0===c.indexOf(".")&&(g=""),j=g+t+(o?o:""),l?j=(l&&u?"(":"")+j+(l&&u?")":""):v>=0&&(u||w)?j=0===v?(u?"-":"+")+j:j+(u?"-":"+"):u&&(j="-"+j),j},stringToNumber:function(a){var c,d,e,f=b.localeData(),g=a,i={thousand:3,million:6,billion:9,trillion:12};if(h.zeroFormat&&a===h.zeroFormat)d=0;else if(h.nullFormat&&a===h.nullFormat||!a.replace(/[^0-9]+/g,"").length)d=null;else{d=1,"."!==f.delimiters.decimal&&(a=a.replace(/\./g,"").replace(f.delimiters.decimal,"."));for(c in i)if(e=new RegExp("[^a-zA-Z]"+f.abbreviations[c]+"(?:\\)|(\\"+f.currency.symbol+")?(?:\\))?)?$"),g.match(e)){d*=Math.pow(10,i[c]);break}d*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),d*=Number(a)}return d},isNaN:function(a){return"number"==typeof a&&isNaN(a)},includes:function(a,b){return a.indexOf(b)!==-1},insert:function(a,b,c){return a.slice(0,c)+b+a.slice(c)},repeat:function(a,b){return new Array(b+1).join(a)},reduce:function(a,b){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof b)throw new TypeError(b+" is not a function");var c,d=Object(a),e=d.length>>>0,f=0;if(3===arguments.length)c=arguments[2];else{for(;f<e&&!(f in d);)f++;if(f>=e)throw new TypeError("Reduce of empty array with no initial value");c=d[f++]}for(;f<e;f++)f in d&&(c=b(c,d[f],f,d));return c},multiplier:function(a){var b=c.toNonExponentialString(a).split(".");return b.length<2?1:Math.pow(10,b[1].length)},correctionFactor:function(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var d=c.multiplier(b);return a>d?a:d},1)},toFixed:function(a,b,d,e){var f,g,h,i,j=c.toNonExponentialString(a).split("."),k=a.toString().split("e"),l=b-(e||0);return f=2===j.length?Math.min(Math.max(j[1].length,l),b):l,h=Math.pow(10,f),i=2===k.length&&"-"!==k[1].charAt(0)?j[0]+(f>0?"."+c.repeat("0",f):""):2===k.length?(d(k[0]+"e"+(Number(k[1])+f))/h).toFixed(f):(d(a+"e+"+f)/h).toFixed(f),e>b-f&&(g=new RegExp("\\.?0{1,"+(e-(b-f))+"}$"),i=i.replace(g,"")),i},toNonExponentialString:function(a){var b,d,e,f,g,h=a.toString(),i=/^(-)?([0-9]+)\.?([0-9]+)?e([-+])?([0-9]+)$/.exec(h);return i?(b=i[1]||"",d=i[2],e=i[3]||"",f=i[4],g=c.repeat("0",parseInt(i[5],10)-("-"===f?d:e).length),b+("-"===f?"0."+g:"")+d+e+("-"!==f?g:"")):h}},b.options=h,b.formats=e,b.locales=f,b.locale=function(a){return a&&f[a.toLowerCase()]&&(h.currentLocale=a.toLowerCase()),h.currentLocale},b.localeData=function(a){if(!a)return f[h.currentLocale]||f[g.currentLocale];if(a=a.toLowerCase(),!f[a])throw new Error("Unknown locale : "+a);return f[a]},b.reset=function(){for(var a in g)h[a]=g[a]},b.zeroFormat=function(a){h.zeroFormat="string"==typeof a?a:null},b.nullFormat=function(a){h.nullFormat="string"==typeof a?a:null},b.defaultFormat=function(a){h.defaultFormat="string"==typeof a?a:"0.0"},b.scalePercentBy100=function(a){h.scalePercentBy100="boolean"!=typeof a||a},b.register=function(a,b,c){if(b=b.toLowerCase(),this[a+"s"][b])throw new TypeError(b+" "+a+" already registered.");return this[a+"s"][b]=c,c},b.validate=function(a,c){var d,e,f,g,h,i,j,k;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numeral.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{j=b.localeData(c)}catch(a){j=b.localeData(b.locale())}return f=j.currency.symbol,h=j.abbreviations,d=j.delimiters.decimal,e="."===j.delimiters.thousands?"\\.":j.delimiters.thousands,k=a.match(/^[^\d]+/),(null===k||(a=a.substr(1),k[0]===f))&&(k=a.match(/[^\d]+$/),(null===k||(a=a.slice(0,-1),k[0]===h.thousand||k[0]===h.million||k[0]===h.billion||k[0]===h.trillion))&&(i=new RegExp(e+"{2}"),!a.match(/[^\d.,]/g)&&(g=a.split(d),!(g.length>2)&&(g.length<2?!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i):1===g[0].length?!!g[0].match(/^\d+$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/):!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/)))))},b.fn=a.prototype={clone:function(){return b(this)},format:function(a,c){var d,f,g,i=this._value,j=a||h.defaultFormat;if(c=c||Math.round,0===i&&null!==h.zeroFormat)f=h.zeroFormat;else if(null===i&&null!==h.nullFormat)f=h.nullFormat;else{for(d in e)if(j.match(e[d].regexps.format)){g=e[d].format;break}g=g||b._.numberToFormat,f=g(i,j,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,c,e){return a+Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([this._value,a],b,0)/d,this},subtract:function(a){function b(a,b,c,e){return a-Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([a],b,Math.round(this._value*d))/d,this},multiply:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)*Math.round(b*f)/Math.round(f*f)}return this._value=c.reduce([this._value,a],b,1),this},divide:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)/Math.round(b*f)}return this._value=c.reduce([this._value,a],b),this},difference:function(a){return Math.abs(b(this._value).subtract(a).value())}},b.register("locale","en",{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:"$"}}),function(){b.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,c,d){var e,f=b._.includes(c," BPS")?" ":"";return a*=1e4,c=c.replace(/\s?BPS/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"BPS"),e=e.join("")):e=e+f+"BPS",e},unformat:function(a){return+(1e-4*b._.stringToNumber(a)).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=a.suffixes.concat(c.suffixes.filter(function(b){return a.suffixes.indexOf(b)<0})),e=d.join("|");e="("+e.replace("B","B(?!PS)")+")",b.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(e)},format:function(d,e,f){var g,h,i,j,k=b._.includes(e,"ib")?c:a,l=b._.includes(e," b")||b._.includes(e," ib")?" ":"";for(e=e.replace(/\s?i?b/,""),h=0;h<=k.suffixes.length;h++)if(i=Math.pow(k.base,h),j=Math.pow(k.base,h+1),null===d||0===d||d>=i&&d<j){l+=k.suffixes[h],i>0&&(d/=i);break}return g=b._.numberToFormat(d,e,f),g+l},unformat:function(d){var e,f,g=b._.stringToNumber(d);if(g){for(e=a.suffixes.length-1;e>=0;e--){if(b._.includes(d,a.suffixes[e])){f=Math.pow(a.base,e);break}if(b._.includes(d,c.suffixes[e])){f=Math.pow(c.base,e);break}}g*=f||1}return g}})}(),function(){b.register("format","currency",{regexps:{format:/(\$)/},format:function(a,c,d){var e,f,g,h,i=b.localeData(),j={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(c=c.replace(/\s?\$\s?/,""),e=b._.numberToFormat(a,c,d),f=b._.includes(e,"-")||b._.includes(e,"("),f?b._.includes(j.before,"-")||b._.includes(j.before,"(")||(j.before="-"+j.before):(j.before=j.before.replace(/[\-\(]/,""),j.after=j.after.replace(/[\-\)]/,"")),h=0;h<j.before.length;h++)switch(g=j.before[h]){case"$":e=b._.insert(e,i.currency.symbol,h);break;case" ":e=b._.insert(e," ",h+i.currency.symbol.length-1)}for(h=j.after.length-1;h>=0;h--)switch(g=j.after[h]){case"$":e=h===j.after.length-1?e+i.currency.symbol:b._.insert(e,i.currency.symbol,-(j.after.length-(1+h)));break;case" ":e=h===j.after.length-1?e+" ":b._.insert(e," ",-(j.after.length-(1+h)+i.currency.symbol.length-1))}return e}})}(),function(){b.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/i},format:function(a,c,d){var e,f="number"!=typeof a||b._.isNaN(a)?"0e+0":a.toExponential(),g=f.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),e=b._.numberToFormat(Number(g[0]),c,d),e+"e"+g[1]},unformat:function(a){function c(a,c,d,e){var f=b._.correctionFactor(a,c),g=a*f*(c*f)/(f*f);return g}var d=a.toLowerCase(),e=b._.includes(d,"e+")?d.split("e+"):d.split("e-"),f=Number(e[0]),g=Number(e[1]);return g=b._.includes(d,"e-")?g*=-1:g,b._.reduce([f,Math.pow(10,g)],c,1)}})}(),function(){b.register("format","ordinal",{regexps:{format:/(o)/},format:function(a,c,d){var e,f=b.localeData(),g=b._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),g+=f.ordinal(a),e=b._.numberToFormat(a,c,d),e+g}})}(),function(){b.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(a,c,d){var e,f=b._.includes(c," %")?" ":"";return b.options.scalePercentBy100&&(a*=100),c=c.replace(/\s?\%/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"%"),e=e.join("")):e=e+f+"%",e},unformat:function(a){var c=b._.stringToNumber(a);return b.options.scalePercentBy100?.01*c:c}})}(),function(){b.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(a,b,c){var d=Math.floor(a/60/60),e=Math.floor((a-60*d*60)/60),f=Math.round(a-60*d*60-60*e);return d+":"+(e<10?"0"+e:e)+":"+(f<10?"0"+f:f)},unformat:function(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)}})}(),b});
|
|
1
|
+
((e,r)=>{"function"==typeof define&&define.amd?define(r):"object"==typeof module&&module.exports?module.exports=r():e.numeral=r()})(this,function(){var g,u,s,c,e,l={},r={},t={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},f={currentLocale:t.currentLocale,zeroFormat:t.zeroFormat,nullFormat:t.nullFormat,defaultFormat:t.defaultFormat,scalePercentBy100:t.scalePercentBy100};function o(e,r){this._input=e,this._value=r}return(g=function(e){var r,t,n,i;if(g.isNumeral(e))r=e.value();else if(0===e||void 0===e)r=0;else if(null===e||u.isNaN(e))r=null;else if("string"==typeof e)if(f.zeroFormat&&e===f.zeroFormat)r=0;else if(f.nullFormat&&e===f.nullFormat||!e.replace(/[^0-9]+/g,"").length)r=null;else{for(t in l)if((i="function"==typeof l[t].regexps.unformat?l[t].regexps.unformat():l[t].regexps.unformat)&&e.match(i)){n=l[t].unformat;break}r=(n=n||g._.stringToNumber)(e)}else r=Number(e)||null;return new o(e,r)}).version="2.1.1",g.isNumeral=function(e){return e instanceof o},g._=u={numberToFormat:function(e,r,t){var n,i,o,a,l=g.localeData(),u=!1,s=!1,c="",f=1e12,m="",h=!1,d=-1,b=!1;if(e=e||0,a=Math.abs(e),g._.includes(r,"(")?(u=!0,r=r.replace(/[\(|\)]/g,"")):(g._.includes(r,"+")||g._.includes(r,"-"))&&(d=(b=g._.includes(r,"+"))?r.indexOf("+"):e<0?r.indexOf("-"):-1,r=r.replace(/[\+|\-]/g,"")),g._.includes(r,"a")&&(i=!!(i=r.match(/a(k|m|b|t)?/))&&i[1],g._.includes(r," a")&&(c=" "),r=r.replace(new RegExp(c+"a[kmbt]?"),""),f<=a&&!i||"t"===i?(c+=l.abbreviations.trillion,e/=f):a<f&&1e9<=a&&!i||"b"===i?(c+=l.abbreviations.billion,e/=1e9):a<1e9&&1e6<=a&&!i||"m"===i?(c+=l.abbreviations.million,e/=1e6):(a<1e6&&1e3<=a&&!i||"k"===i)&&(c+=l.abbreviations.thousand,e/=1e3)),g._.includes(r,"[.]")&&(s=!0,r=r.replace("[.]",".")),o=e.toString().split(".")[0],f=r.split(".")[1],a=r.indexOf(","),n=(r.split(".")[0].split(",")[0].match(/0/g)||[]).length,f?(f=f.replace(/^\s+|\s+$/g,""),o=(m=g._.includes(f,"[")?(f=(f=f.replace("]","")).split("["),g._.toFixed(e,f[0].length+f[1].length,t,f[1].length)):g._.toFixed(e,f.length,t)).split(".")[0],m=g._.includes(m,".")?l.delimiters.decimal+m.split(".")[1]:"",s&&0===Number(m.slice(1))&&(m="")):o=g._.toFixed(e,0,t),c&&!i&&1e3<=Number(o)&&c!==l.abbreviations.trillion)switch(o=String(Number(o)/1e3),c){case l.abbreviations.thousand:c=l.abbreviations.million;break;case l.abbreviations.million:c=l.abbreviations.billion;break;case l.abbreviations.billion:c=l.abbreviations.trillion}if(g._.includes(o,"-")&&(o=o.slice(1),h=!0),o.length<n)for(var p=n-o.length;0<p;p--)o="0"+o;return-1<a&&(o=o.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+l.delimiters.thousands)),f=(o=0===r.indexOf(".")?"":o)+m+(c||""),u?f=(u&&h?"(":"")+f+(u&&h?")":""):0<=d&&(h||b)?f=0===d?(h?"-":"+")+f:f+(h?"-":"+"):h&&(f="-"+f),f},stringToNumber:function(e){var r,t,n,i=g.localeData(),o=e,a={thousand:3,million:6,billion:9,trillion:12};if(f.zeroFormat&&e===f.zeroFormat)t=0;else if(f.nullFormat&&e===f.nullFormat||!e.replace(/[^0-9]+/g,"").length)t=null;else{for(r in t=1,"."!==i.delimiters.decimal&&(e=e.replace(/\./g,"").replace(i.delimiters.decimal,".")),a)if(n=new RegExp("[^a-zA-Z]"+i.abbreviations[r]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),o.match(n)){t*=Math.pow(10,a[r]);break}t*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),t*=Number(e)}return t},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,r){return-1!==e.indexOf(r)},insert:function(e,r,t){return e.slice(0,t)+r+e.slice(t)},repeat:function(e,r){return new Array(r+1).join(e)},reduce:function(e,r){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof r)throw new TypeError(r+" is not a function");var t,n=Object(e),i=n.length>>>0,o=0;if(3===arguments.length)t=arguments[2];else{for(;o<i&&!(o in n);)o++;if(i<=o)throw new TypeError("Reduce of empty array with no initial value");t=n[o++]}for(;o<i;o++)o in n&&(t=r(t,n[o],o,n));return t},multiplier:function(e){e=u.toNonExponentialString(e).split(".");return e.length<2?1:Math.pow(10,e[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,r){r=u.multiplier(r);return r<e?e:r},1)},toFixed:function(e,r,t,n){var i=u.toNonExponentialString(e).split("."),o=e.toString().split("e"),a=r-(n||0),a=2===i.length?Math.min(Math.max(i[1].length,a),r):a,l=Math.pow(10,a),i=2===o.length&&"-"!==o[1].charAt(0)?i[0]+(0<a?"."+u.repeat("0",a):""):(2===o.length?t(o[0]+"e"+(Number(o[1])+a))/l:t(e+"e+"+a)/l).toFixed(a);return r-a<n&&(o=new RegExp("\\.?0{1,"+(n-(r-a))+"}$"),i=i.replace(o,"")),i},toNonExponentialString:function(e){var r,t,n,i,e=e.toString(),o=/^(-)?([0-9]+)\.?([0-9]+)?e([-+])?([0-9]+)$/.exec(e);return o?(r=o[1]||"",t=o[2],n=o[3]||"",i=o[4],o=u.repeat("0",parseInt(o[5],10)-("-"===i?t:n).length),r+("-"===i?"0."+o:"")+t+n+("-"!==i?o:"")):e}},g.options=f,g.formats=l,g.locales=r,g.locale=function(e){return e&&r[e.toLowerCase()]&&(f.currentLocale=e.toLowerCase()),f.currentLocale},g.localeData=function(e){if(!e)return r[f.currentLocale]||r[t.currentLocale];if(e=e.toLowerCase(),r[e])return r[e];throw new Error("Unknown locale : "+e)},g.reset=function(){for(var e in t)f[e]=t[e]},g.zeroFormat=function(e){f.zeroFormat="string"==typeof e?e:null},g.nullFormat=function(e){f.nullFormat="string"==typeof e?e:null},g.defaultFormat=function(e){f.defaultFormat="string"==typeof e?e:"0.0"},g.scalePercentBy100=function(e){f.scalePercentBy100="boolean"!=typeof e||e},g.register=function(e,r,t){if(r=r.toLowerCase(),this[e+"s"][r])throw new TypeError(r+" "+e+" already registered.");return this[e+"s"][r]=t},g.validate=function(e,r){var t,n,i,o;if("string"!=typeof e&&(e+="",console.warn)&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{i=g.localeData(r)}catch(e){i=g.localeData(g.locale())}return r=i.currency.symbol,n=i.abbreviations,t=i.delimiters.decimal,i="."===i.delimiters.thousands?"\\.":i.delimiters.thousands,(null===(o=e.match(/^[^\d]+/))||(e=e.substr(1),o[0]===r))&&!(null!==(o=e.match(/[^\d]+$/))&&(e=e.slice(0,-1),o[0]!==n.thousand)&&o[0]!==n.million&&o[0]!==n.billion&&o[0]!==n.trillion||(r=new RegExp(i+"{2}"),e.match(/[^\d.,]/g))||2<(o=e.split(t)).length||(o.length<2?!o[0].match(/^\d+.*\d$/)||o[0].match(r):1===o[0].length?!o[0].match(/^\d+$/)||o[0].match(r)||!o[1].match(/^\d+$/):!o[0].match(/^\d+.*\d$/)||o[0].match(r)||!o[1].match(/^\d+$/)))},g.fn=o.prototype={clone:function(){return g(this)},format:function(e,r){var t,n,i,o=this._value,a=e||f.defaultFormat;if(r=r||Math.round,0===o&&null!==f.zeroFormat)n=f.zeroFormat;else if(null===o&&null!==f.nullFormat)n=f.nullFormat;else{for(t in l)if(a.match(l[t].regexps.format)){i=l[t].format;break}n=(i=i||g._.numberToFormat)(o,a,r)}return n},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var i=u.correctionFactor.call(null,this._value,e);return this._value=u.reduce([this._value,e],function(e,r,t,n){return e+Math.round(i*r)},0)/i,this},subtract:function(e){var i=u.correctionFactor.call(null,this._value,e);return this._value=u.reduce([e],function(e,r,t,n){return e-Math.round(i*r)},Math.round(this._value*i))/i,this},multiply:function(e){return this._value=u.reduce([this._value,e],function(e,r,t,n){var i=u.correctionFactor(e,r);return Math.round(e*i)*Math.round(r*i)/Math.round(i*i)},1),this},divide:function(e){return this._value=u.reduce([this._value,e],function(e,r,t,n){var i=u.correctionFactor(e,r);return Math.round(e*i)/Math.round(r*i)}),this},difference:function(e){return Math.abs(g(this._value).subtract(e).value())}},g.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var r=e%10;return 1==~~(e%100/10)?"th":1==r?"st":2==r?"nd":3==r?"rd":"th"},currency:{symbol:"$"}}),g.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,r,t){var n=g._.includes(r," BPS")?" ":"";return e*=1e4,r=r.replace(/\s?BPS/,""),e=g._.numberToFormat(e,r,t),e=g._.includes(e,")")?((e=e.split("")).splice(-1,0,n+"BPS"),e.join("")):e+n+"BPS"},unformat:function(e){return+(1e-4*g._.stringToNumber(e)).toFixed(15)}}),c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},e="("+(e=(s={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(c.suffixes.filter(function(e){return s.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",g.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(e)},format:function(e,r,t){var n,i,o,a=g._.includes(r,"ib")?c:s,l=g._.includes(r," b")||g._.includes(r," ib")?" ":"";for(r=r.replace(/\s?i?b/,""),n=0;n<=a.suffixes.length;n++)if(i=Math.pow(a.base,n),o=Math.pow(a.base,n+1),null===e||0===e||i<=e&&e<o){l+=a.suffixes[n],0<i&&(e/=i);break}return g._.numberToFormat(e,r,t)+l},unformat:function(e){var r,t,n=g._.stringToNumber(e);if(n){for(r=s.suffixes.length-1;0<=r;r--){if(g._.includes(e,s.suffixes[r])){t=Math.pow(s.base,r);break}if(g._.includes(e,c.suffixes[r])){t=Math.pow(c.base,r);break}}n*=t||1}return n}}),g.register("format","currency",{regexps:{format:/(\$)/},format:function(e,r,t){var n,i,o=g.localeData(),a={before:r.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:r.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(r=r.replace(/\s?\$\s?/,""),n=g._.numberToFormat(e,r,t),g._.includes(n,"-")||g._.includes(n,"(")?g._.includes(a.before,"-")||g._.includes(a.before,"(")||(a.before="-"+a.before):(a.before=a.before.replace(/[\-\(]/,""),a.after=a.after.replace(/[\-\)]/,"")),i=0;i<a.before.length;i++)switch(a.before[i]){case"$":n=g._.insert(n,o.currency.symbol,i);break;case" ":n=g._.insert(n," ",i+o.currency.symbol.length-1)}for(i=a.after.length-1;0<=i;i--)switch(a.after[i]){case"$":n=i===a.after.length-1?n+o.currency.symbol:g._.insert(n,o.currency.symbol,-(a.after.length-(1+i)));break;case" ":n=i===a.after.length-1?n+" ":g._.insert(n," ",-(a.after.length-(1+i)+o.currency.symbol.length-1))}return n}}),g.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/i},format:function(e,r,t){e=("number"!=typeof e||g._.isNaN(e)?"0e+0":e.toExponential()).split("e");return r=r.replace(/e[\+|\-]{1}0/,""),g._.numberToFormat(Number(e[0]),r,t)+"e"+e[1]},unformat:function(e){var e=e.toLowerCase(),r=g._.includes(e,"e+")?e.split("e+"):e.split("e-"),t=Number(r[0]),r=Number(r[1]);return r=g._.includes(e,"e-")?-1*r:r,g._.reduce([t,Math.pow(10,r)],function(e,r,t,n){var i=g._.correctionFactor(e,r);return e*i*(r*i)/(i*i)},1)}}),g.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,r,t){var n=g.localeData(),i=g._.includes(r," o")?" ":"";return r=r.replace(/\s?o/,""),i+=n.ordinal(e),g._.numberToFormat(e,r,t)+i}}),g.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,r,t){var n=g._.includes(r," %")?" ":"";return g.options.scalePercentBy100&&(e*=100),r=r.replace(/\s?\%/,""),e=g._.numberToFormat(e,r,t),e=g._.includes(e,")")?((e=e.split("")).splice(-1,0,n+"%"),e.join("")):e+n+"%"},unformat:function(e){e=g._.stringToNumber(e);return g.options.scalePercentBy100?.01*e:e}}),g.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,r,t){var n=Math.floor(e/60/60),i=Math.floor((e-60*n*60)/60),e=Math.round(e-60*n*60-60*i);return n+":"+(i<10?"0"+i:i)+":"+(e<10?"0"+e:e)},unformat:function(e){var e=e.split(":"),r=0;return 3===e.length?r=(r=(r+=60*Number(e[0])*60)+60*Number(e[1]))+Number(e[2]):2===e.length&&(r=(r+=60*Number(e[0]))+Number(e[1])),Number(r)}}),g});
|
package/numeral.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @preserve
|
|
2
2
|
* numeral.js
|
|
3
|
-
* version : 2.1.
|
|
3
|
+
* version : 2.1.1
|
|
4
4
|
* author : Adam Draper
|
|
5
5
|
* license : MIT
|
|
6
6
|
* http://adamwdraper.github.com/Numeral-js/
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
var numeral,
|
|
23
23
|
_,
|
|
24
|
-
VERSION = '2.1.
|
|
24
|
+
VERSION = '2.1.1',
|
|
25
25
|
formats = {},
|
|
26
26
|
locales = {},
|
|
27
27
|
defaults = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "numeral-lts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Maintained fork of numeral (Numeral.js) — drop-in replacement, fixes NaN when formatting very large or small numbers, \"0$.00\" for small negative currency, and the crash after setting an unknown locale.",
|
|
5
5
|
"homepage": "https://github.com/cyberpusa-ai/Numeral-js#readme",
|
|
6
6
|
"author": {
|