code: function getTransactions(data, options) {
                const config = Object.assign({}, {
                  exludeEmptyTranscations: true,
                }, options);
                const values = new Set();
                const valuesMap = new Map();
                const transactions = data
                  .map(csvRow => {
                    [
                      ...Object.values(csvRow),
                    ].forEach(csvVal => {
                      values.add(csvVal);
                    });
                    values.forEach(val => {
                      if (!valuesMap.get(val)) {
                        const index = (valuesMap.size < 0)
                          ? 0
                          : parseInt(valuesMap.size / 2, 10);
                        valuesMap.set(val, index.toString());
                        valuesMap.set(index.toString(), val);
                      }
                    });
                    return Object.values(csvRow)
                      .map(csvCell =>
                        valuesMap.get(csvCell))
                      .filter(val => val !== undefined);
                  });
                return {
                  values,
                  valuesMap,
                  transactions: (config.exludeEmptyTranscations)
                    ? transactions.filter(csvRow => csvRow.length)
                    : transactions,
                };
              }
docs: import { default as ObjectValues, } from 'object.values'; if (!Object.values) { ObjectValues.shim(); } 
  Formats an array of transactions into a sparse matrix like format for Apriori/Eclat
  @memberOf calc
  @see {@link https://github.com/alexisfacques/Node-FPGrowth}
  @param {Array} data - CSV data of transactions
  @param {Object} options
  @param {Boolean} [options.exludeEmptyTranscations=true] - exclude empty rows of transactions
  @returns {Object} {values - unique list of all values, valuesMap - map of values and labels, transactions - formatted sparse array}