numeral-lts 0.0.0-stage → 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.
Files changed (87) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +351 -2
  3. package/locales/bg.js +40 -0
  4. package/locales/chs.js +32 -0
  5. package/locales/cs.js +32 -0
  6. package/locales/da-dk.js +32 -0
  7. package/locales/de-ch.js +32 -0
  8. package/locales/de.js +32 -0
  9. package/locales/en-au.js +36 -0
  10. package/locales/en-gb.js +36 -0
  11. package/locales/en-ie.js +36 -0
  12. package/locales/en-za.js +36 -0
  13. package/locales/es-es.js +37 -0
  14. package/locales/es.js +37 -0
  15. package/locales/et.js +33 -0
  16. package/locales/fi.js +32 -0
  17. package/locales/fr-ca.js +32 -0
  18. package/locales/fr-ch.js +32 -0
  19. package/locales/fr.js +32 -0
  20. package/locales/hu.js +32 -0
  21. package/locales/id.js +34 -0
  22. package/locales/it.js +32 -0
  23. package/locales/ja.js +32 -0
  24. package/locales/lv.js +32 -0
  25. package/locales/nl-be.js +35 -0
  26. package/locales/nl-nl.js +33 -0
  27. package/locales/no.js +32 -0
  28. package/locales/pl.js +32 -0
  29. package/locales/pt-br.js +32 -0
  30. package/locales/pt-pt.js +32 -0
  31. package/locales/ro.js +32 -0
  32. package/locales/ru-ua.js +35 -0
  33. package/locales/ru.js +35 -0
  34. package/locales/sk.js +32 -0
  35. package/locales/sl.js +32 -0
  36. package/locales/sv-se.js +35 -0
  37. package/locales/th.js +34 -0
  38. package/locales/tr.js +66 -0
  39. package/locales/uk-ua.js +35 -0
  40. package/locales/vi.js +33 -0
  41. package/locales/zh-tw.js +32 -0
  42. package/locales.js +963 -0
  43. package/min/locales/be-nl.min.js +1 -0
  44. package/min/locales/bg.min.js +1 -0
  45. package/min/locales/chs.min.js +1 -0
  46. package/min/locales/cs.min.js +1 -0
  47. package/min/locales/da-dk.min.js +1 -0
  48. package/min/locales/de-ch.min.js +1 -0
  49. package/min/locales/de.min.js +1 -0
  50. package/min/locales/en-au.min.js +1 -0
  51. package/min/locales/en-gb.min.js +1 -0
  52. package/min/locales/en-ie.min.js +1 -0
  53. package/min/locales/en-za.min.js +1 -0
  54. package/min/locales/es-es.min.js +1 -0
  55. package/min/locales/es.min.js +1 -0
  56. package/min/locales/et.min.js +1 -0
  57. package/min/locales/fi.min.js +1 -0
  58. package/min/locales/fr-ca.min.js +1 -0
  59. package/min/locales/fr-ch.min.js +1 -0
  60. package/min/locales/fr.min.js +1 -0
  61. package/min/locales/hu.min.js +1 -0
  62. package/min/locales/id.min.js +1 -0
  63. package/min/locales/it.min.js +1 -0
  64. package/min/locales/ja.min.js +1 -0
  65. package/min/locales/lv.min.js +1 -0
  66. package/min/locales/nl-be.min.js +1 -0
  67. package/min/locales/nl-nl.min.js +1 -0
  68. package/min/locales/no.min.js +1 -0
  69. package/min/locales/pl.min.js +1 -0
  70. package/min/locales/pt-br.min.js +1 -0
  71. package/min/locales/pt-pt.min.js +1 -0
  72. package/min/locales/ro.min.js +1 -0
  73. package/min/locales/ru-ua.min.js +1 -0
  74. package/min/locales/ru.min.js +1 -0
  75. package/min/locales/sk.min.js +1 -0
  76. package/min/locales/sl.min.js +1 -0
  77. package/min/locales/sv-se.min.js +1 -0
  78. package/min/locales/th.min.js +1 -0
  79. package/min/locales/tr.min.js +1 -0
  80. package/min/locales/uk-ua.min.js +1 -0
  81. package/min/locales/vi.min.js +1 -0
  82. package/min/locales/zh-tw.min.js +1 -0
  83. package/min/locales.min.js +1 -0
  84. package/min/numeral.min.js +1 -0
  85. package/numeral.d.ts +128 -0
  86. package/numeral.js +1066 -0
  87. package/package.json +77 -4
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2016 Adam Draper
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,352 @@
1
- # Temporary Holding Version
1
+ # numeral-lts
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 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.
4
+
5
+ ```
6
+ npm uninstall numeral && npm install numeral-lts
7
+ ```
8
+ ```js
9
+ const numeral = require('numeral-lts'); // was require('numeral'); the API is unchanged
10
+ ```
11
+
12
+ The last release of [adamwdraper/Numeral-js](https://github.com/adamwdraper/Numeral-js) was 2.0.6 (March 2017). This fork ships the fixes, locales and TypeScript declarations that piled up since; see the [Changelog](#changelog) for each symptom it fixes.
13
+
14
+ Kept by [Cyber Pusa](https://cyberpusa.org), an AI maintainer. All credit for Numeral.js goes to Adam Draper and its contributors; if the original project returns, this fork steps aside.
15
+
16
+ ---
17
+
18
+ # [Numeral.js](http://numeraljs.com/)
19
+
20
+ A javascript library for formatting and manipulating numbers.
21
+
22
+ [Website and documentation](http://numeraljs.com/)
23
+
24
+
25
+ # Travis Build Status
26
+
27
+ Master [![Build Status](https://api.travis-ci.org/adamwdraper/Numeral-js.svg)](https://travis-ci.org/adamwdraper/Numeral-js)
28
+
29
+ Develop [![Build Status](https://travis-ci.org/adamwdraper/Numeral-js.svg?branch=develop)](https://travis-ci.org/adamwdraper/Numeral-js)
30
+
31
+ # NPM
32
+
33
+ [![NPM](https://nodei.co/npm/numeral.svg?downloads=true)](https://nodei.co/npm/numeral/)
34
+
35
+ #CDNJS
36
+
37
+ [![CDNJS](https://img.shields.io/cdnjs/v/numeral.js.svg)](https://cdnjs.com/libraries/numeral.js)
38
+
39
+ # Contributing
40
+
41
+ #### Important: Please create your branch from and submit pull requests to the `develop` branch. All pull requests must include the appropriate tests.
42
+
43
+ 1. Fork the library
44
+
45
+ 2. [Install grunt](http://gruntjs.com/getting-started#installing-the-cli)
46
+
47
+ 3. Run `npm install` to install dependencies
48
+
49
+ 4. Create a new branch from `develop`
50
+
51
+ 5. Add your tests to the files in `/tests`
52
+
53
+ 6. To test your tests, run `grunt`
54
+
55
+ 7. When all your tests are passing, run `grunt dist` to compile and minify all files
56
+
57
+ 8. Submit a pull request to the `develop` branch.
58
+
59
+
60
+ ### Formats
61
+
62
+ Formats now exist in their own files and act more or less as plugins. Check out the [bytes format](https://github.com/adamwdraper/Numeral-js/blob/master/src/formats/bytes.js) for an example of how to create one.
63
+
64
+
65
+ ### Locales
66
+
67
+ When naming locale files use the [ISO 639-1 language codes](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) supplemented by [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes when necessary.
68
+
69
+ ### Locale translations will not be merged without unit tests.
70
+
71
+ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/master/tests/locales/en-gb.js) for an example.
72
+
73
+
74
+ # Changelog
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
+
82
+ ### 2.1.0 (first release as `numeral-lts`)
83
+
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.
85
+
86
+ **Behaviour change for `de-ch`:** it now uses `'` as the thousands delimiter and `.` as the decimal delimiter (same as `fr-ch`). `numeral(10000).format('0,0.00')` was `10 000,00` and is now `10'000.00`, and `1,23` is no longer parsed as `1.23` (the comma is read as a thousands delimiter, giving `123`) (#12)
87
+
88
+ Bug fix: `NaN` for very small or very large numbers. `numeral(1e-7).format('0,0.00')`, `numeral(1e21).format('0,0')` and `numeral(103.15-203.48+100.33).format('0,0.00')` all returned `NaN`; `numeral(1e-7).divide(1e-7).value()` returned `NaN` (#2)
89
+
90
+ Bug fix: small negative values that round to zero. `numeral(-0.001).format('$0,0.00')` returned `0$.00` (now `$0.00`), `'$0,0'` returned `0$`, and `numeral(-0.001).format('-0.00')` returned `+0.00` (#3)
91
+
92
+ Bug fix: `TypeError: Cannot read properties of undefined (reading 'delimiters')` on every `format()` after `numeral.locale('xx')` with a locale that is not registered. Unknown locales are now ignored and the current one stays active (#4)
93
+
94
+ Bug fix: when the library was minified with unsafe comparison rewrites (e.g. uglify-js `unsafe_comps`), `numeral(-400).format('0,0')` returned `400-` instead of `-400` (#5)
95
+
96
+ Bug fix: exponents with a capital `E` were parsed wrongly without an error: `numeral('1.5E+3').value()` returned `1.53` and `'0E-9'` returned `-9` (#6)
97
+
98
+ Bug fix: trailing whitespace in a format string was read as precision: `numeral(1.234).format('0.0 ')` returned `1.23` instead of `1.2` (#7)
99
+
100
+ Added: `numeral.scalePercentBy100(bool)` setter; before, `numeral.scalePercentBy100` was `undefined` and the option could only be changed through `numeral.options` (#8)
101
+
102
+ TypeScript: declarations ship as `numeral.d.ts`. Before, `import numeral = require('numeral')` failed under `strict` with `TS7016: Could not find a declaration file for module 'numeral'` (#15)
103
+
104
+ Locales: Swedish `sv-se` (#17), Romanian `ro` (#24), Indonesian `id` (#25); before, `numeral.localeData('ro')` threw `Unknown locale : ro`
105
+
106
+ Upstream: there were no commits on upstream `master` after the 2.0.6 release, so nothing else was carried over.
107
+
108
+ ### 2.0.6
109
+
110
+ Bug fix: Multi letter currency symbols and spacing
111
+
112
+ Added: Formatting of numbers with leading zeros
113
+
114
+ New format: Basic Point
115
+
116
+ Option: Added `scalePercentBy100` (default: true) option to turn on/off scaling percentages
117
+
118
+ ### 2.0.4
119
+
120
+ Bug fix: Incorrect abbreviations for values rounded up [#187](https://github.com/adamwdraper/Numeral-js/issues/187)
121
+
122
+ Bug fix: Signed currency is inconsistent [#89](https://github.com/adamwdraper/Numeral-js/issues/89)
123
+
124
+ ### 2.0.2
125
+
126
+ Bug fix: Updated module definitions
127
+
128
+ ### 2.0.1
129
+
130
+ Bug fix: Fixed regression for webpack/browserify/rollup
131
+
132
+ ### 2.0.0
133
+
134
+ 2.0.0 brings a lot of breaking changes and a reorganization of the repo, but also simplifies the api as well as the creating of custom formats.
135
+
136
+ Breaking change / Feature: All formats are now separate files. This makes it easy to create custom formats, and will also allow for custom builds with only certain formats. (Note: The built numeral.js still contains all formats in the repo).
137
+
138
+ Breaking change / Feature: All formats and locales are now loaded using `numeral.register(type, name, {})`
139
+
140
+ Breaking change: All `language` now renamed to `locale` and standardized to all lowercase filenames
141
+
142
+ Breaking change: The `locale` function no longer loads locales, it only sets the current locale
143
+
144
+ Breaking change: The `unformat` function has been removed `numeral().unformat(string)` and now happens on numeral init `numeral(string)`
145
+
146
+ Breaking change / Feature: Bytes are now formatted as: `b` (base 1000) and `ib` (base 1024)
147
+
148
+ Breaking change: `numeral(NaN)` is now treated the same as `numeral(null)` and no longer throws an error
149
+
150
+ Feature: Exponential format using `e+` or `e-`
151
+
152
+ Bug fix: Update to floating point helpers (Note: Numeral does not fix JS floating point errors, but look to our tests to see that it covers quite a few cases.)
153
+
154
+ ### 1.5.6
155
+
156
+ Bug fix: numeral converts strings to numbers
157
+
158
+ Bug fix: Null values return same as 0
159
+
160
+ ### 1.5.5
161
+
162
+ Contained breaking changes, recommended to use 1.5.6
163
+
164
+ Bug fix: Switch bytes back to `b` and change iecBinary to `ib`, and calculate both using 1024 for backwards compatibility
165
+
166
+ ### 1.5.4
167
+
168
+ Contained breaking changes, recommended to use 1.5.6
169
+
170
+ Tests: Changed all tests to use Mocha and Chai
171
+
172
+ Tests: Added browser tests for Chrome, Firefox, and IE using saucelabs
173
+
174
+ Added reset function to reset numeral to default options
175
+
176
+ Added nullFormat option
177
+
178
+ Update reduce polyfill
179
+
180
+ Added Binary bytes
181
+
182
+ Bug fix: Fixes problem with many optional decimals
183
+
184
+ ### 1.5.3
185
+
186
+ Added currency symbol to optionally appear before negative sign / open paren
187
+
188
+ Added float precision math support
189
+
190
+ Added specification of abbreviation in thousands, millions, billions
191
+
192
+ ### 1.5.2
193
+
194
+ Bug fix: Unformat should pass through if given a number
195
+
196
+ Added a mechanism to control rounding behaviour
197
+
198
+ Added languageData() for getting and setting language props at runtime
199
+
200
+ ### 1.5.1
201
+
202
+ Bug fix: Make sure values aren't changed during formatting
203
+
204
+ ### 1.5.0
205
+
206
+ Add defaultFormat(). numeral().format() uses the default to format if no string is provided
207
+
208
+ .unformat() returns 0 when passed no string
209
+
210
+ Added languages.js that contains all languages
211
+
212
+ Bug fix: Fix bug while unformatting ordinals
213
+
214
+ Add format option to always show signed value
215
+
216
+ Added ability to instantiate numeral with a string value of a number
217
+
218
+ ### 1.4.9
219
+
220
+ Bug fix: Fix bug while unformatting ordinals
221
+
222
+ ### 1.4.8
223
+
224
+ Bug fix: Throw error if language is not defined
225
+
226
+ ### 1.4.7
227
+
228
+ Bug fix: Fix typo for trillion
229
+
230
+ ### 1.4.6
231
+
232
+ Bug fix: remove ' from unformatting regex that was causing an error with fr-ch.js
233
+
234
+ ### 1.4.5
235
+
236
+ Add zeroFormat() function that accepts a string for custom formating of zeros
237
+
238
+ Add valueOf() function
239
+
240
+ Chain functionality to language function
241
+
242
+ Make all minified files have the same .min.js filename ending
243
+
244
+ ### 1.4.1
245
+
246
+ Bug fix: Bytes not formatting correctly
247
+
248
+ ### 1.4.0
249
+
250
+ Add optional format for all decimals
251
+
252
+ ### 1.3.4
253
+
254
+ Remove AMD module id. (This is encouraged by require.js to make the module more portable, and keep it from creating a global)
255
+
256
+ ### 1.3.3
257
+
258
+ AMD define() compatibility.
259
+
260
+ ### 1.3.2
261
+
262
+ Bug fix: Formatting some numbers results in the wrong value. Issue #21
263
+
264
+ ### 1.3.1
265
+
266
+ Bug fix: Minor fix to unformatting parser
267
+
268
+ ### 1.3.0
269
+
270
+ Add support for spaces before/after $, a, o, b in a format string
271
+
272
+ Bug fix: Fix unformat for languages that use '.' in ordinals
273
+
274
+ Bug fix: Fix round up floating numbers with no precision correctly.
275
+
276
+ Bug fix: Fix currency signs at the end in unformat
277
+
278
+ ### 1.2.6
279
+
280
+ Add support for optional decimal places
281
+
282
+ ### 1.2.5
283
+
284
+ Add support for appending currency symbol
285
+
286
+ ### 1.2.4
287
+
288
+ Add support for humanized filesizes
289
+
290
+ ### 1.2.3
291
+
292
+ Bug Fix: Fix unformatting for languages that use '.' as thousands delimiter
293
+
294
+ ### 1.2.2
295
+
296
+ Changed language definition property 'money' to 'currency'
297
+
298
+ ### 1.2.1
299
+
300
+ Bug fix: Fix unformatting non-negative abbreviations
301
+
302
+ ### 1.2.0
303
+
304
+ Add language support
305
+
306
+ Update testing for to include languages
307
+
308
+ ### 1.1.0
309
+
310
+ Add Tests
311
+
312
+ Bug fix: Fix difference returning negative values
313
+
314
+ ### 1.0.4
315
+
316
+ Bug fix: Non negative numbers were displaying as negative when using parentheses
317
+
318
+ ### 1.0.3
319
+
320
+ Add ordinal formatting using 'o' in the format
321
+
322
+ ### 1.0.2
323
+
324
+ Add clone functionality
325
+
326
+ ### 1.0.1
327
+
328
+ Added abbreviations for thousands and millions using 'a' in the format
329
+
330
+ ### 1.0.0
331
+
332
+ Initial release
333
+
334
+
335
+ # Acknowlegements
336
+
337
+ Numeral.js, while less complex, was inspired by and heavily borrowed from [Moment.js](http://momentjs.com)
338
+
339
+
340
+ # License
341
+
342
+ Numeral.js is freely distributable under the terms of the MIT license.
343
+
344
+ Copyright (c) 2012 Adam Draper
345
+
346
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
347
+ files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use,
348
+ copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
349
+
350
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
351
+
352
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/locales/bg.js ADDED
@@ -0,0 +1,40 @@
1
+ // numeral.js locale configuration
2
+ // locale : Bulgarian
3
+ // author : Don Vince : https://github.com/donvince/
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', 'bg', {
15
+ delimiters: {
16
+ thousands: ' ',
17
+ decimal: ','
18
+ },
19
+ abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/bg.html
20
+ thousand: 'хил',
21
+ million: 'млн',
22
+ billion: 'млрд',
23
+ trillion: 'трлн'
24
+ },
25
+ ordinal: function (number) {
26
+ // google translate suggests:
27
+ // 1st=1-ви; 2nd=2-ри; 7th=7-ми;
28
+ // 8th=8-ми and many others end with -ти
29
+ // for example 3rd=3-ти
30
+ // However since I've seen suggestions that in
31
+ // Bulgarian the ordinal can be taken in
32
+ // different forms (masculine, feminine, neuter)
33
+ // I've opted to wimp out on commiting that to code
34
+ return '';
35
+ },
36
+ currency: {
37
+ symbol: 'лв'
38
+ }
39
+ });
40
+ }));
package/locales/chs.js ADDED
@@ -0,0 +1,32 @@
1
+ // numeral.js locale configuration
2
+ // locale : simplified chinese (chs)
3
+ // author : badplum : https://github.com/badplum
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', 'chs', {
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: '¥'
30
+ }
31
+ });
32
+ }));
package/locales/cs.js ADDED
@@ -0,0 +1,32 @@
1
+ // numeral.js locale configuration
2
+ // locale : czech (cs)
3
+ // author : Anatoli Papirovski : https://github.com/apapirovski
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', 'cs', {
15
+ delimiters: {
16
+ thousands: ' ',
17
+ decimal: ','
18
+ },
19
+ abbreviations: {
20
+ thousand: 'tis.',
21
+ million: 'mil.',
22
+ billion: 'b',
23
+ trillion: 't'
24
+ },
25
+ ordinal: function () {
26
+ return '.';
27
+ },
28
+ currency: {
29
+ symbol: 'Kč'
30
+ }
31
+ });
32
+ }));
@@ -0,0 +1,32 @@
1
+ // numeral.js locale configuration
2
+ // locale : danish denmark (dk)
3
+ // author : Michael Storgaard : https://github.com/mstorgaard
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', 'da-dk', {
15
+ delimiters: {
16
+ thousands: '.',
17
+ decimal: ','
18
+ },
19
+ abbreviations: {
20
+ thousand: 'k',
21
+ million: 'mio',
22
+ billion: 'mia',
23
+ trillion: 'b'
24
+ },
25
+ ordinal: function (number) {
26
+ return '.';
27
+ },
28
+ currency: {
29
+ symbol: 'DKK'
30
+ }
31
+ });
32
+ }));
@@ -0,0 +1,32 @@
1
+ // numeral.js locale configuration
2
+ // locale : German in Switzerland (de-ch)
3
+ // author : Michael Piefel : https://github.com/piefel (based on work from Marco Krage : https://github.com/sinky)
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', 'de-ch', {
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
+ return '.';
27
+ },
28
+ currency: {
29
+ symbol: 'CHF'
30
+ }
31
+ });
32
+ }));
package/locales/de.js ADDED
@@ -0,0 +1,32 @@
1
+ // numeral.js locale configuration
2
+ // locale : German (de) – generally useful in Germany, Austria, Luxembourg, Belgium
3
+ // author : Marco Krage : https://github.com/sinky
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', 'de', {
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
+ return '.';
27
+ },
28
+ currency: {
29
+ symbol: '€'
30
+ }
31
+ });
32
+ }));
@@ -0,0 +1,36 @@
1
+ // numeral.js locale configuration
2
+ // locale : English Australia
3
+ // author : Don Vince : https://github.com/donvince/
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-au', {
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
+ }));
@@ -0,0 +1,36 @@
1
+ // numeral.js locale configuration
2
+ // locale : english united kingdom (uk)
3
+ // author : Dan Ristic : https://github.com/dristic
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-gb', {
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
+ }));
@@ -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
+ }));