var l10n_file = __dirname + '/../l10n/commands/inventory.yml';
var l10n = require('../src/l10n')(l10n_file);
exports.command = function(rooms, items, players, npcs, Commands) {
  return function(args, player) {
    player.sayL10n(l10n, 'INV');

    // See how many of an item a player has so we can do stuff like (2) apple
    var itemcounts = {};
    player.getInventory()
      .forEach(i => {
        var vnum = i.getVnum();
        if (!i.isEquipped()) {
          itemcounts[vnum] ? itemcounts[vnum] += 1 : itemcounts[vnum] = 1;
        }
      });

    var displayed = {};
    player.getInventory()
      .forEach(i => {
        var vnum = i.getVnum();
        if (!(vnum in displayed) && !i.isEquipped()) {
          displayed[vnum] = 1;
          player.say((itemcounts[vnum] > 1 ? '(' + itemcounts[vnum] + ') ' : '') + i.getShortDesc(player.getLocale()));
        }
      });

      util.log(player.getName() + '\'s inventory: ');
      util.log(displayed);

      if (!Object.keys(displayed).length){
      	player.sayL10n(l10n, 'EMPTY');
      }

  };
};

@@ -1,15 +1,31 @@
-var
+'use strict';%0Aconst
  l10n_file =
@@ -72,19 +72,21 @@
 y.yml';%0A
-var
+const
  l10n = 
@@ -120,16 +120,47 @@
 _file);%0A
+const util = require('util');%0A%0A
 exports.
@@ -169,24 +169,16 @@
 mmand = 
-function
 (rooms, 
@@ -208,16 +208,19 @@
 ommands)
+ =%3E
  %7B%0A  ret
@@ -227,16 +227,8 @@
 urn 
-function
 (arg
@@ -237,16 +237,19 @@
  player)
+ =%3E
  %7B%0A    p
@@ -363,17 +363,19 @@
     
-var
+const
  item
-c
+C
 ount
@@ -377,32 +377,50 @@
 Counts = %7B%7D;%0A   
+ const inventory =
  player.getInven
@@ -417,39 +417,47 @@
 r.getInventory()
+;
 %0A    
-  
+inventory
 .forEach(i =%3E %7B%0A
@@ -442,32 +442,35 @@
 entory.forEach(i
+tem
  =%3E %7B%0A        va
@@ -459,35 +459,37 @@
 em =%3E %7B%0A        
-var
+const
  vnum = i.getVnu
@@ -473,32 +473,35 @@
   const vnum = i
+tem
 .getVnum();%0A    
@@ -510,16 +510,19 @@
   if (!i
+tem
 .isEquip
@@ -540,25 +540,25 @@
         item
-c
+C
 ounts%5Bvnum%5D 
@@ -559,25 +559,25 @@
 vnum%5D ? item
-c
+C
 ounts%5Bvnum%5D 
@@ -583,25 +583,25 @@
  += 1 : item
-c
+C
 ounts%5Bvnum%5D 
@@ -630,19 +630,21 @@
 );%0A%0A    
-var
+const
  display
@@ -660,36 +660,17 @@
     
-player.getInventory()%0A      
+inventory
 .for
@@ -675,16 +675,19 @@
 orEach(i
+tem
  =%3E %7B%0A  
@@ -696,11 +696,13 @@
     
-var
+const
  vnu
@@ -706,16 +706,19 @@
 vnum = i
+tem
 .getVnum
@@ -759,16 +759,19 @@
 d) && !i
+tem
 .isEquip
@@ -832,25 +832,25 @@
 er.say((item
-c
+C
 ounts%5Bvnum%5D 
@@ -865,17 +865,17 @@
 ' + item
-c
+C
 ounts%5Bvn
@@ -894,16 +894,19 @@
  '') + i
+tem
 .getShor

Add util and refactor inventory command. :no_bell: