dist/fitty.module.js
function fittyCreate(elements, options) {

    // set options object
    var fittyOptions = _extends({}, defaultOptions, options);

    // create fitties
    var publicFitties = elements.map(function (element) {

      // create fitty instance
      var f = _extends({}, fittyOptions, {

        // internal options for this fitty
        element: element
      });

      // register this fitty
      subscribe(f);

      // should we observe DOM mutations
      observeMutations(f);

      // expose API
      return {
        element: element,
        fit: fit(f, DrawState.DIRTY),
        unsubscribe: unsubscribe(f)
      };
    });

    // call redraw on newly initiated fitties
    requestRedraw();

    // expose fitties
    return publicFitties;
  }
function fittyCreate(elements, options) {

    // set options object
    var fittyOptions = _extends({}, defaultOptions, options);

    // create fitties
    var publicFitties = elements.map(function (element) {

      // create fitty instance
      var f = _extends({}, fittyOptions, {

        // internal options for this fitty
        element: element
      });

      // register this fitty
      subscribe(f);

      // should we observe DOM mutations
      observeMutations(f);

      // expose API
      return {
        element: element,
        fit: fit(f, DrawState.DIRTY),
        unsubscribe: unsubscribe(f)
      };
    });

    // call redraw on newly initiated fitties
    requestRedraw();

    // expose fitties
    return publicFitties;
  }
function fittyCreate ( elements , options ) { // set options object var fittyOptions = _extends ( { } , defaultOptions , options ) ; // create fitties var publicFitties = elements . map ( function ( element ) { // create fitty instance var f = _extends ( { } , fittyOptions , { // internal options for this fitty element : element } ) ; // register this fitty subscribe ( f ) ; // should we observe DOM mutations observeMutations ( f ) ; // expose API return { element : element , fit : fit ( f , DrawState . DIRTY ) , unsubscribe : unsubscribe ( f ) } ; } ) ; // call redraw on newly initiated fitties requestRedraw ( ) ; // expose fitties return publicFitties ; }
array of elements in, fitty instances out
array of elements in fitty instances out