You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
307 B

  1. 'use strict'
  2. import filesize from 'filesize.js'
  3. import toUpper from 'lodash/toUpper'
  4. module.exports = {
  5. /**
  6. * Convert bytes to humanized form
  7. * @param {number} rawSize Size in bytes
  8. * @returns {string} Humanized file size
  9. */
  10. filesize(rawSize) {
  11. return toUpper(filesize(rawSize))
  12. }
  13. }