text: import slugify from "slugify";
  
  /**
   * Get a random number function
   * @param {float} min - min number to return
   * @param {float} max - max number to return
   * @param {boolean} floor - floor the value (default false)
   */
  const rand = (min = 0, max = 1, floor = false) => {
    const rand = Math.random() * (max - min) + min;
    return floor ? Math.floor(rand) : rand;
  };
  
  /**
   * Debounce from Underscore.js
   * @param {function} func - function to trigger
   * @param {delay} wait - delay
   * @param {boolean} immediate - if true call function on the leading edge instead of the trailing
   */
  const debounce = function(func, wait, immediate) {
    var timeout;
    return function() {
      var context = this,
        args = arguments;
      var later = function() {
        timeout = null;
        if (!immediate) func.apply(context, args);
      };
      var callNow = immediate && !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
      if (callNow) func.apply(context, args);
    };
  };
  
  /**
   * Just a bunch of timing function
   */
  const timingFunctions = {
    // no easing, no acceleration
    linear: function(t) {
      return t;
    },
    // accelerating from zero velocity
    easeInQuad: function(t) {
      return t * t;
    },
    // decelerating to zero velocity
    easeOutQuad: function(t) {
      return t * (2 - t);
    },
    // acceleration until halfway, then deceleration
    easeInOutQuad: function(t) {
      return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
    },
    // accelerating from zero velocity
    easeInCubic: function(t) {
      return t * t * t;
    },
    // decelerating to zero velocity
    easeOutCubic: function(t) {
      return --t * t * t + 1;
    },
    // acceleration until halfway, then deceleration
    easeInOutCubic: function(t) {
      return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
    },
    // accelerating from zero velocity
    easeInQuart: function(t) {
      return t * t * t * t;
    },
    // decelerating to zero velocity
    easeOutQuart: function(t) {
      return 1 - --t * t * t * t;
    },
    // acceleration until halfway, then deceleration
    easeInOutQuart: function(t) {
      return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
    },
    // accelerating from zero velocity
    easeInQuint: function(t) {
      return t * t * t * t * t;
    },
    // decelerating to zero velocity
    easeOutQuint: function(t) {
      return 1 + --t * t * t * t * t;
    },
    // acceleration until halfway, then deceleration
    easeInOutQuint: function(t) {
      return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;
    }
  };
  
  /**
   * Slugify plugin global opt.
   */
  const slugOpt = {
    replacement: "_",
    remove: /[^a-zA-Z0-9_$()+\/-\s]/g,
    lower: true
  };
  
  const slug = str => slugify(str, slugOpt);
  
  export { slug, timingFunctions, debounce, rand };
  