src/counter.js
/**
 * Generate utility class names and corresponding counter-increment values.
 * 
 * @param {string} counterName name of counter being incremented
 * @param {number} maxInclusive positive integer specifying inclusive range of
 *  possible increment values
 * @param {boolean} isNegative whether to generate negative increments
 * @returns an object mapping utility class names to CSS counter-increment
 *  values
 */
Generate utility class names and corresponding counter-increment values.

@param {string} counterName name of counter being incremented
@param {number} maxInclusive positive integer specifying inclusive range of
possible increment values
@param {boolean} isNegative whether to generate negative increments
@returns an object mapping utility class names to CSS counter-increment
values
Generate utility class names and corresponding counter - increment values . @param { string } counterName name of counter being incremented @param { number } maxInclusive positive integer specifying inclusive range of possible increment values @param { boolean } isNegative whether to generate negative increments @returns an object mapping utility class names to CSS counter - increment values
function incrementClasses(counterName, maxInclusive, isNegative) {
  classes = {};
  for (let i = 1; i <= maxInclusive; i++) {
    let counter = `${isNegative ? '-' : ""}${counterName}`;
    let key = (i == 1)
      ? counter
      : `${counter}-${i}`;
    let value = `${counterName} ${isNegative ? '-' : ''}${i}`;
    classes[key] = value;
  }
  return classes;
}
function incrementClasses ( counterName , maxInclusive , isNegative ) { classes = { } ; for ( let i = 1 ; i <= maxInclusive ; i ++ ) { let counter = ` ${ isNegative ? '-' : "" } ${ counterName } ` ; let key = ( i == 1 ) ? counter : ` ${ counter } ${ i } ` ; let value = ` ${ counterName } ${ isNegative ? '-' : '' } ${ i } ` ; classes [ key ] = value ; } return classes ; }
Generate utility class names and corresponding counter-increment values.
Generate utility class names and corresponding counter - increment values .