Skip to content

Commit c3556ec

Browse files
committed
Merge pull request #104 from adamwdraper/develop
Develop
2 parents 5b319b2 + 4d0be28 commit c3556ec

File tree

24 files changed

+867
-37
lines changed

24 files changed

+867
-37
lines changed

Gruntfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ module.exports = function(grunt) {
6969
grunt.loadNpmTasks('grunt-contrib-jshint');
7070
grunt.loadNpmTasks('grunt-contrib-concat');
7171

72+
grunt.registerTask('default', [
73+
'test'
74+
]);
75+
7276
grunt.registerTask('test', [
7377
'jshint',
7478
'nodeunit'
7579
]);
7680

7781
// P
78-
grunt.registerTask('release', [
82+
grunt.registerTask('build', [
7983
'jshint',
8084
'nodeunit',
8185
'concat',

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Please submit all pull requests to the `develop` branch.
2424

2525
4. Add your tests to the files in `/tests`
2626

27-
5. To test your tests, run `grunt test`
27+
5. To test your tests, run `grunt`
2828

29-
6. When all your tests are passing, run `grunt release` to minify all files
29+
6. When all your tests are passing, run `grunt build` to minify all files
3030

31-
7. Submit a pull request.
31+
7. Submit a pull request to the `develop` branch.
3232

3333

3434
### Languages
@@ -42,6 +42,14 @@ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/mast
4242

4343
# Changelog
4444

45+
### 1.5.2
46+
47+
Bug fix: Unformat should pass through if given a number
48+
49+
Added a mechanism to control rounding behaviour
50+
51+
Added languageData() for getting and setting language props at runtime
52+
4553
### 1.5.1
4654

4755
Bug fix: Make sure values aren't changed during formatting

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "numeral",
33
"repo": "adamwdraper/Numeral-js",
4-
"version": "1.5.1",
4+
"version": "1.5.2",
55
"description": "Format and manipulate numbers.",
66
"keywords": [
77
"numeral",

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "numeral",
33
"repo": "adamwdraper/Numeral-js",
4-
"version": "1.5.1",
4+
"version": "1.5.2",
55
"description": "Format and manipulate numbers.",
66
"keywords": [
77
"numeral",

languages.js

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,40 @@
323323
}
324324
}());
325325

326+
/*!
327+
* numeral.js language configuration
328+
* language : french (Canada) (fr-CA)
329+
* author : Léo Renaud-Allaire : https://github.com/renaudleo
330+
*/
331+
(function () {
332+
var language = {
333+
delimiters: {
334+
thousands: ' ',
335+
decimal: ','
336+
},
337+
abbreviations: {
338+
thousand: 'k',
339+
million: 'M',
340+
billion: 'G',
341+
trillion: 'T'
342+
},
343+
ordinal : function (number) {
344+
return number === 1 ? 'er' : 'e';
345+
},
346+
currency: {
347+
symbol: '$'
348+
}
349+
};
350+
351+
// Node
352+
if (typeof module !== 'undefined' && module.exports) {
353+
module.exports = language;
354+
}
355+
// Browser
356+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
357+
this.numeral.language('fr-CA', language);
358+
}
359+
}());
326360
/*!
327361
* numeral.js language configuration
328362
* language : french (fr-ch)
@@ -392,6 +426,40 @@
392426
this.numeral.language('fr', language);
393427
}
394428
}());
429+
/*!
430+
* numeral.js language configuration
431+
* language : Hungarian (hu)
432+
* author : Peter Bakondy : https://github.com/pbakondy
433+
*/
434+
(function () {
435+
var language = {
436+
delimiters: {
437+
thousands: ' ',
438+
decimal: ','
439+
},
440+
abbreviations: {
441+
thousand: 'E', // ezer
442+
million: 'M', // millió
443+
billion: 'Mrd', // milliárd
444+
trillion: 'T' // trillió
445+
},
446+
ordinal: function (number) {
447+
return '.';
448+
},
449+
currency: {
450+
symbol: ' Ft'
451+
}
452+
};
453+
454+
// Node
455+
if (typeof module !== 'undefined' && module.exports) {
456+
module.exports = language;
457+
}
458+
// Browser
459+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
460+
this.numeral.language('hu', language);
461+
}
462+
}());
395463
/*!
396464
* numeral.js language configuration
397465
* language : italian Italy (it)
@@ -461,6 +529,41 @@
461529
}
462530
}());
463531

532+
/*!
533+
* numeral.js language configuration
534+
* language : netherlands-dutch (nl-nl)
535+
* author : Dave Clayton : https://github.com/davedx
536+
*/
537+
(function () {
538+
var language = {
539+
delimiters: {
540+
thousands: '.',
541+
decimal : ','
542+
},
543+
abbreviations: {
544+
thousand : 'k',
545+
million : 'mln',
546+
billion : 'mrd',
547+
trillion : 'bln'
548+
},
549+
ordinal : function (number) {
550+
var remainder = number % 100;
551+
return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
552+
},
553+
currency: {
554+
symbol: '€ '
555+
}
556+
};
557+
558+
// Node
559+
if (typeof module !== 'undefined' && module.exports) {
560+
module.exports = language;
561+
}
562+
// Browser
563+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
564+
this.numeral.language('nl-nl', language);
565+
}
566+
}());
464567
/*!
465568
* numeral.js language configuration
466569
* language : polish (pl)
@@ -638,6 +741,41 @@
638741
}
639742
}());
640743

744+
/*!
745+
* numeral.js language configuration
746+
* language : slovak (sk)
747+
* author : Ahmed Al Hafoudh : http://www.freevision.sk
748+
*/
749+
(function () {
750+
var language = {
751+
delimiters: {
752+
thousands: ' ',
753+
decimal: ','
754+
},
755+
abbreviations: {
756+
thousand: 'tis.',
757+
million: 'mil.',
758+
billion: 'b',
759+
trillion: 't'
760+
},
761+
ordinal: function () {
762+
return '.';
763+
},
764+
currency: {
765+
symbol: '€'
766+
}
767+
};
768+
769+
// Node
770+
if (typeof module !== 'undefined' && module.exports) {
771+
module.exports = language;
772+
}
773+
// Browser
774+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
775+
this.numeral.language('sk', language);
776+
}
777+
}());
778+
641779
/*!
642780
* numeral.js language configuration
643781
* language : thai (th)

languages/fr-CA.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*!
2+
* numeral.js language configuration
3+
* language : french (Canada) (fr-CA)
4+
* author : Léo Renaud-Allaire : https://github.com/renaudleo
5+
*/
6+
(function () {
7+
var language = {
8+
delimiters: {
9+
thousands: ' ',
10+
decimal: ','
11+
},
12+
abbreviations: {
13+
thousand: 'k',
14+
million: 'M',
15+
billion: 'G',
16+
trillion: 'T'
17+
},
18+
ordinal : function (number) {
19+
return number === 1 ? 'er' : 'e';
20+
},
21+
currency: {
22+
symbol: '$'
23+
}
24+
};
25+
26+
// Node
27+
if (typeof module !== 'undefined' && module.exports) {
28+
module.exports = language;
29+
}
30+
// Browser
31+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
32+
this.numeral.language('fr-CA', language);
33+
}
34+
}());

languages/hu.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*!
2+
* numeral.js language configuration
3+
* language : Hungarian (hu)
4+
* author : Peter Bakondy : https://github.com/pbakondy
5+
*/
6+
(function () {
7+
var language = {
8+
delimiters: {
9+
thousands: ' ',
10+
decimal: ','
11+
},
12+
abbreviations: {
13+
thousand: 'E', // ezer
14+
million: 'M', // millió
15+
billion: 'Mrd', // milliárd
16+
trillion: 'T' // trillió
17+
},
18+
ordinal: function (number) {
19+
return '.';
20+
},
21+
currency: {
22+
symbol: ' Ft'
23+
}
24+
};
25+
26+
// Node
27+
if (typeof module !== 'undefined' && module.exports) {
28+
module.exports = language;
29+
}
30+
// Browser
31+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
32+
this.numeral.language('hu', language);
33+
}
34+
}());

languages/nl-nl.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*!
2+
* numeral.js language configuration
3+
* language : netherlands-dutch (nl-nl)
4+
* author : Dave Clayton : https://github.com/davedx
5+
*/
6+
(function () {
7+
var language = {
8+
delimiters: {
9+
thousands: '.',
10+
decimal : ','
11+
},
12+
abbreviations: {
13+
thousand : 'k',
14+
million : 'mln',
15+
billion : 'mrd',
16+
trillion : 'bln'
17+
},
18+
ordinal : function (number) {
19+
var remainder = number % 100;
20+
return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
21+
},
22+
currency: {
23+
symbol: '€ '
24+
}
25+
};
26+
27+
// Node
28+
if (typeof module !== 'undefined' && module.exports) {
29+
module.exports = language;
30+
}
31+
// Browser
32+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
33+
this.numeral.language('nl-nl', language);
34+
}
35+
}());

languages/sk.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*!
2+
* numeral.js language configuration
3+
* language : slovak (sk)
4+
* author : Ahmed Al Hafoudh : http://www.freevision.sk
5+
*/
6+
(function () {
7+
var language = {
8+
delimiters: {
9+
thousands: ' ',
10+
decimal: ','
11+
},
12+
abbreviations: {
13+
thousand: 'tis.',
14+
million: 'mil.',
15+
billion: 'b',
16+
trillion: 't'
17+
},
18+
ordinal: function () {
19+
return '.';
20+
},
21+
currency: {
22+
symbol: '€'
23+
}
24+
};
25+
26+
// Node
27+
if (typeof module !== 'undefined' && module.exports) {
28+
module.exports = language;
29+
}
30+
// Browser
31+
if (typeof window !== 'undefined' && this.numeral && this.numeral.language) {
32+
this.numeral.language('sk', language);
33+
}
34+
}());

0 commit comments

Comments
 (0)