Socket
Socket
Sign inDemoInstall

vue-filter-number-format

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-filter-number-format

Vue.js filter for formatting numbers


Version published
Weekly downloads
2K
increased by21.24%
Maintainers
1
Install size
340 kB
Created
Weekly downloads
 

Readme

Source

vue-filter-number-format

Vue.js filter for formatting numbers

This is a simple wrapper for Numeral.js.

Suggested usage

Register globally as a Vue filter in your main.js-ish file:

import numFormat from 'vue-filter-number-format';

Vue.filter('numFormat', numFormat);

// 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.

Development

# install dependencies
yarn

# serve example app with hot reload at localhost:8080
yarn run dev

# build for production with minification
yarn run build

License

MIT

FAQs

Last updated on 18 Apr 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc