Skip to content

Commit d034b7c

Browse files
authored
Merge pull request #100 from tsulli/number-filter-units
Adding billions (B) and trillions (T) units
2 parents d4c8c38 + 1db67dd commit d034b7c

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ index.html
44
package-lock.json
55
examples/
66
.DS_Store
7+
.vs

dist/vue2-filters.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
123123

124124
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
125125

126-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
126+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
127127

128128
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
129129

@@ -738,6 +738,12 @@ function addUnit(num, config) {
738738
}, {
739739
value: 1e6,
740740
symbol: 'M'
741+
}, {
742+
value: 1e9,
743+
symbol: 'B'
744+
}, {
745+
value: 1e12,
746+
symbol: 'T'
741747
}];
742748
var i;
743749

dist/vue2-filters.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)