Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
vue-filter-number-format
Advanced tools
Readme
Vue.js filter for formatting numbers
This is a simple wrapper for Numeral.js.
This package requires you to install Numeral.js as a peer dependency (numeral@^2
). This way, you can use a different version of Numeral, or even a drop-in replacement with the same API.
Use version 1 of this package if you want it to install its own Numeral.js dependency as part of the bundle.
Pass in Numeral to create the formatter function, and register globally as a Vue filter in your main.js-ish file:
import numeral from 'numeral';
import numFormat from 'vue-filter-number-format';
Vue.filter('numFormat', numFormat(numeral));
// new Vue ...
Use anywhere in your .vue files:
// default format is '0,0'
{{ 69696969 | numFormat }} -> "69,696,969"
// use a custom format string
{{ 420 | numFormat('0.000') }} -> "420.000"
{{ 666 | numFormat('0,0o') }} -> "666th"
See the Numeral.js docs for other formatting options.
MIT
FAQs
Vue.js filter for formatting numbers
The npm package vue-filter-number-format receives a total of 1,755 weekly downloads. As such, vue-filter-number-format popularity was classified as popular.
We found that vue-filter-number-format demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.