lib/thematic.js
function(varsData) {
    if (isJSON(varsData)) {
      // JSON variables
      varsData = JSON.parse(varsData);

      for (var key in varsData) {
        if (varsData.hasOwnProperty(key)) {
          this.vars[normalizeVarName(key)] = varsData[key];
        }
      }
    }
    else {
      // Sass variables
      var pattern = /\$([^\s:]+)\s*:\s*([^!;]+)/g;
      var match = pattern.exec(varsData);

      while (match) {
        this.vars[ match[1] ] = match[2].trim();
        match = pattern.exec(varsData);
      }
    }
  }
function(varsData) {
    if (isJSON(varsData)) {
      // JSON variables
      varsData = JSON.parse(varsData);

      for (var key in varsData) {
        if (varsData.hasOwnProperty(key)) {
          this.vars[normalizeVarName(key)] = varsData[key];
        }
      }
    }
    else {
      // Sass variables
      var pattern = /\$([^\s:]+)\s*:\s*([^!;]+)/g;
      var match = pattern.exec(varsData);

      while (match) {
        this.vars[ match[1] ] = match[2].trim();
        match = pattern.exec(varsData);
      }
    }
  }
function ( varsData ) { if ( isJSON ( varsData ) ) { // JSON variables varsData = JSON . parse ( varsData ) ; for ( var key in varsData ) { if ( varsData . hasOwnProperty ( key ) ) { this . vars [ normalizeVarName ( key ) ] = varsData [ key ] ; } } } else { // Sass variables var pattern = / \$([^\s:]+)\s*:\s*([^!;]+) / g ; var match = pattern . exec ( varsData ) ; while ( match ) { this . vars [ match [ 1 ] ] = match [ 2 ] . trim ( ) ; match = pattern . exec ( varsData ) ; } } }
Parses raw Sass variable definitions
into the thematic mapping of vars names to values.
Parses raw Sass variable definitions into the thematic mapping of vars names to values .