Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit ed6c219

Browse files
committed
Add language option to the src files, regenerate dist files. Bump version
1 parent ab306a0 commit ed6c219

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-numeraljs",
33
"author": "Dave Bauman",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"license": "MIT",
66
"main": ["./dist/angular-numeraljs.js"],
77
"repository": {

dist/angular-numeraljs.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* AngularJS filter for Numeral.js: number formatting as a filter
3-
* @version v1.0.1 - 2014-09-16
3+
* @version v1.0.2 - 2014-09-16
44
* @link https://github.com/baumandm/angular-numeraljs
55
* @author Dave Bauman <baumandm@gmail.com>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,11 +9,14 @@
99
'use strict';
1010
angular.module('ngNumeraljs', [])
1111
.filter('numeraljs', function () {
12-
return function (input, format) {
12+
return function (input, format, language) {
1313
if (input == null || format == null)
1414
return input;
1515
if (format === '')
1616
return '';
17+
if (language != null)
18+
numeral.language(language);
19+
1720

1821
return numeral(input).format(format);
1922
};

dist/angular-numeraljs.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* AngularJS filter for Numeral.js: number formatting as a filter
3-
* @version v1.0.1 - 2014-09-16
3+
* @version v1.0.2 - 2014-09-16
44
* @link https://github.com/baumandm/angular-numeraljs
55
* @author Dave Bauman <baumandm@gmail.com>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
77
*/
8-
"use strict";angular.module("ngNumeraljs",[]).filter("numeraljs",function(){return function(a,b){return null==a||null==b?a:""===b?"":numeral(a).format(b)}});
8+
"use strict";angular.module("ngNumeraljs",[]).filter("numeraljs",function(){return function(a,b,c){return null==a||null==b?a:""===b?"":(null!=c&&numeral.language(c),numeral(a).format(b))}});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-numeraljs",
33
"description": "AngularJS filter for Numeral.js: number formatting as a filter",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"homepage": "https://github.com/baumandm/angular-numeraljs",
66
"author": "Dave Bauman <baumandm@gmail.com>",
77
"repository": {

src/angular-numeraljs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
'use strict';
33
angular.module('ngNumeraljs', [])
44
.filter('numeraljs', function () {
5-
return function (input, format) {
5+
return function (input, format, language) {
66
if (input == null || format == null)
77
return input;
88
if (format === '')
99
return '';
10+
if (language != null)
11+
numeral.language(language);
12+
1013

1114
return numeral(input).format(format);
1215
};

0 commit comments

Comments
 (0)