code: function sortTags(data) {
    const toBuffer = (str) => {
      if (Buffer.from && Buffer.from !== Uint8Array.from) {
        return Buffer.from(str);
      }
      return new Buffer(str); // eslint-disable-line
    };
    const keys = _.map(_.keys(data), toBuffer).sort(Buffer.compare);
    const result = {};
    _.forEach(keys, (key) => {
      const k = key.toString();
      result[k] = data[k];
    });
    return result;
  }
docs: Tags should be sorted by key before being sent for best performance. The sort should match that from the Go bytes.Compare function (http://golang.org/pkg/bytes/#Compare).