vue-round-filter
1.1.2 • Public • Published vue-round-filter
round number with whichever decimal accuracy
installation
let round = require('vue-round-filter');
import round from 'vue-round-filter';
new Vue({
filters: {
round,
},
});
usage
<span> {{ pi | round }} </span>
<span> 3 </span>
<span> {{ pi | round 2 }} </span>
<span> 3.14 </span>
If you're need to keep decimal accuracy, pass true
as second argument
<span> {{ int | round 3 }} </span>
<span> 3 </span>
<span> {{ int | round 3 true }} </span>
<span> 3.000 </span>
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.1.2 | 95 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.1.2 | 95 | |
1.1.1 | 3 | |
1.1.0 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
Weekly Downloads