Skip to content

h2akim/vue-pretty-print-bytes-filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-pretty-print-bytes-filter

Fork of james2doyle/vue-pretty-print-bytes-filter

Add precision options to the filter

Original README

A filter for Vue.js to format bytes into a nice human-readable format. I pretty (no pun intended) much just stole this from sindresorhus/pretty-bytes.

Install

Available through npm as vue-pretty-bytes-filter, or include as an inline script.

Settings

Add this line to your app.js after Vue loading

Vue.use(require('vue-pretty-bytes-filter'))

Usage

Template:

<em>{{ 1337 | prettyBytes(3) }}</em>

Render:

<em>1.34 kB</em>

About

A filter for Vue.js to format bytes into a nice human-readable format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%