Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/humanize.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

// Formats the value like a 'human-readable' file size (i.e. '13 KB', '4.1 MB', '102 bytes', etc).
fileSize(filesize, precision = 2) {
for (const label in LABELS_FOR_POWERS_OF_KILO) {
for (let label in LABELS_FOR_POWERS_OF_KILO) {
if (LABELS_FOR_POWERS_OF_KILO.hasOwnProperty(label)) {
const minnum = LABELS_FOR_POWERS_OF_KILO[label];
if (filesize >= minnum) {
Expand Down Expand Up @@ -352,7 +352,7 @@

if (exists(object) && typeof object === 'object' && !isArray(object)) {
const defs = [];
for (const key in object) {
for (let key in object) {
if (object.hasOwnProperty(key)) {
const val = object[key];
defs.push(`${ key }${ joiner }${ val }`);
Expand Down