code: function getFlag(val, compressed) {
      var flag = 0;
  
      if (typeof val === 'number') {
          flag = FLAG_NUMERIC;
      } else if (Buffer.isBuffer(val)) {
          flag = FLAG_BINARY;
      } else if (typeof val !== 'string') {
          flag = FLAG_JSON;
      }
  
      if (compressed === true) {
          flag = flag | FLAG_COMPRESSED;
      }
  
      return flag;
  }
docs: Miscellaneous helper functions
   
  getFlag() - Given a value and whether it's compressed, return the correct
  flag
  
  @param {*} val - the value to inspect and on which to set the flag
  @param {bool} compressed - whether or not this value is to be compressed
  @returns {Number} the value of the flag