old_contents: var shortlink = require("../lib/shortlink");
  
  setInterval(function() {
  
      // Generate random
      var random = shortlink.generate(1);
  
      // Decode random string
      var id = shortlink.decode(random);
  
      // Encode to string
      var str = shortlink.encode(id);
  
      // Decode string
      var res = shortlink.decode(str);
  
      console.log('id = ' + id);
      console.log(random + ' : ' + str);
      console.log('id = ' + res);
      console.log('----------------');
  
  }, 2000);
  
  
  
new_contents: var shortlink = require("../lib/shortlink");
  
  setInterval(function() {
  
      // Generate random
      var random = shortlink.generate(6);
      console.log('Generate random shortlink: ' + random);
  
      // Decode random shortlink to int
      var id = shortlink.decode(random);
      console.log('Decode this shortlink to int: ' + id);
  
      // Encode this int to shortlink
      var str = shortlink.encode(id);
      console.log('Encode this int to shortlink: ' + str);
  
      // Decode this shortlink to int
      var res = shortlink.decode(str);
      console.log('Decode this shortlink to int: ' + res);
  
      console.log('--------------');
  
  }, 2000);
  
  
  
subject: Change demo