Browse Source

Swap humanize.filesize for pretty-bytes

pm2
Luke Childs 8 years ago
parent
commit
30b6bc377b
  1. 4
      lib/nunjuck-filters.js
  2. 4
      package.json

4
lib/nunjuck-filters.js

@ -1,7 +1,7 @@
const humanize = require('humanize');
const prettyBytes = require('pretty-bytes');
const filters = {
bandwidth: node => `${humanize.filesize(node.advertised_bandwidth)}/s`
bandwidth: node => `${prettyBytes(node.advertised_bandwidth)}/s`
};
module.exports = app => Object.keys(filters).forEach(filter => {

4
package.json

@ -5,9 +5,9 @@
"main": "index.js",
"dependencies": {
"express": "^4.14.0",
"humanize": "0.0.9",
"nunjucks": "^2.4.2",
"onionoo": "^0.3.1"
"onionoo": "^0.3.1",
"pretty-bytes": "^4.0.2"
},
"devDependencies": {
"nodemon": "^1.10.2"

Loading…
Cancel
Save