Parse Style variables to object
327510
function parseVariableDeclarations(string) {

  // Do not parse empty files. Otherwise gonzales.parse will fail
  if (!string) {
    return [];
  }

  var out = [],
      ast = gonzales.parse(string, {
        syntax: 'less'
      });
  // Exclude functions arguments
  ast.traverse(function(node, index, parent) {
    if (node.is('arguments')) {
      parent.removeChild(index);
    }
  });
  ast.traverseByType('declaration', function(decl) {
    // Only consider @variable: value declarations
    var varName,
        varFullName,
        varVal = '',
        varLine = 1;
    decl.traverseByType('variable', function(varNode) {
      varName = varNode.content.toString();
      varFullName = varNode.toString();
      decl.traverseByType('value', function(valNode) {
        varVal = valNode.toString();
        varLine = valNode.start.line;
      });
      if (varFullName !== varVal) {
        out.push({
          name: varName,
          value: varVal.trim(),
          line: varLine
        });
      }
    });
  });
  return out;
}
861638
function(value){
		value = Function.from(value)();
		value = (typeof value == 'string') ? value.split(' ') : Array.from(value);
		return value.map(function(val){
			val = String(val);
			var found = false;
			Object.each(Fx.CSS.Parsers, function(parser, key){
				if (found) return;
				var parsed = parser.parse(val);
				if (parsed || parsed === 0) found = {value: parsed, parser: parser};
			});
			found = found || {value: val, parser: Fx.CSS.Parsers.String};
			return found;
		});
	}
411027
def simple_input(self, variables):
        
        json_args = fill_template_str(json.dumps(self.data), variables)
        return try_get_objects(json_args)
237240
def _parse_src_js_var(self, variable):
        """"""

        src_url = 'http://115.com'
        r = self.http.get(src_url)
        soup = BeautifulSoup(r.content)
        scripts = [script.text for script in soup.find_all('script')]
        text = '\n'.join(scripts)
        pattern = "%s\s*=\s*(.*);" % (variable.upper())
        m = re.search(pattern, text)
        if not m:
            msg = 'Cannot parse source JavaScript for %s.' % variable
            raise APIError(msg)
        return json.loads(m.group(1).strip())
886300
def _styleof(expr, styles):
    """"""
    style = dict()
    for expr_filter, sty in styles:
        if expr_filter(expr):
            style.update(sty)
    return style
604624
function ( obj, key, value ) {
		key = string.toCamelCase( key );

		if ( value !== undefined ) {
			obj.style[key] = value;
			return obj;
		}
		else {
			return obj.style[key];
		}
	}
1057798
def _read_style(style):
    ''' '''

    if isinstance(style, string_types):
        style = [style]
    else:
        style = list(style)

    return style
615512
function sassifyFn(rawObject) {
  var sassified = '';

  Object.keys(rawObject).forEach(function iterateVariables(key) {
    var variable = rawObject[key];

    var stringified = JSON.stringify(variable);

    // Trim off double quotes for CSS variables.
    stringified = stringified.substring(1, stringified.length - 1);

    sassified += '$' + key + ': ' + stringified + ';\n';
  });

  return sassified;
}
653694
def parseCCUSysVar(self, data):
        """"""
        if data['type'] == 'LOGIC':
            return data['name'], data['value'] == 'true'
        elif data['type'] == 'NUMBER':
            return data['name'], float(data['value'])
        elif data['type'] == 'LIST':
            return data['name'], int(data['value'])
        else:
            return data['name'], data['value']
166521
function cssToJs(style) {
  if (typeof style !== 'string') {
    throw new TypeError('First argument must be a string.');
  }
  var styleObj = {};

  styleToObject(style, function(propName, propValue) {
    // Check if it's not a comment node
    if (propName && propValue) {
      styleObj[utilities.camelCase(propName)] = propValue;
    }
  });
  return styleObj;
}
445602
function parse_style_json_object(text, options)
{
	// remove multiline comments
	text = text.replace(/\/\*([\s\S]*?)\*\//g, '')

	// ignore curly braces for now.
	// maybe support curly braces along with tabulation in future
	text = text.replace(/[\{\}]/g, '')

	const lines = text.split('\n')

	// helper class for dealing with tabulation
	const tabulator = new Tabulator(Tabulator.determine_tabulation(lines))

	// parse text into JSON object
	let style_json = parse_style_class(tabulator.extract_tabulation(lines), [])

	// expand CSS shorthand properties
	// (e.g. `margin: 1px` -> `margin-left: 1px; ...`)
	if (options.expand)
	{
		style_json = style_builder.build(style_json)
	}

	// expand "modifier" style classes
	// (which can override some of the expanded shorthand CSS properties)
	return expand_modifier_style_classes(style_json)
}
542946
function convertStyleToRules( style ) {
		var styleDef = style.getDefinition(),
			rules = {},
			rule,
			attrs = styleDef.attributes;

		rules[ styleDef.element ] = rule = {
			styles: styleDef.styles,
			requiredStyles: styleDef.styles && CKEDITOR.tools.objectKeys( styleDef.styles )
		};

		if ( attrs ) {
			attrs = copy( attrs );
			rule.classes = attrs[ 'class' ] ? attrs[ 'class' ].split( /\s+/ ) : null;
			rule.requiredClasses = rule.classes;
			delete attrs[ 'class' ];
			rule.attributes = attrs;
			rule.requiredAttributes = attrs && CKEDITOR.tools.objectKeys( attrs );
		}

		return rules;
	}
819993
function( obj )
		{
			var style = this.toString();
			if ( style )
			{
				obj instanceof CKEDITOR.dom.element ?
					obj.setAttribute( 'style', style ) :
					obj instanceof CKEDITOR.htmlParser.element ?
						obj.attributes.style = style :
						obj.style = style;
			}
		}
343789
function parseStyleText( styleText )
	{
		var retval = {};
		styleText
		   .replace( /&quot;/g, '"' )
		   .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
		{
			retval[ name ] = value;
		} );
		return retval;
	}
62975
function(style)
	{
		var result = [];
		
		if (style != null)
		{
			var tokens = style.split(';');
			
			for (var i = 0; i < tokens.length; i++)
			{
				// Keeps the key, value assignments
				if (tokens[i].indexOf('=') >= 0)
				{
					result.push(tokens[i]);
				}
			}
		}
		
		return result.join(';');
	}
1145777
def _getStyle(node):
    """
    if node.nodeType == Node.ELEMENT_NODE and len(node.getAttribute('style')) > 0:
        styleMap = {}
        rawStyles = node.getAttribute('style').split(';')
        for style in rawStyles:
            propval = style.split(':')
            if len(propval) == 2:
                styleMap[propval[0].strip()] = propval[1].strip()
        return styleMap
    else:
        return {}
503443
function toProperties(variables) {
  const categories = Object.keys(variables);
  const valueOf = (category, value) => {
    let retVal;

    if (category === 'color') {
      retVal = `rgb(${value.r}, ${value.g}, ${value.b})`;
    } else if (category === 'font-family') {
      retVal = value
        .map(font => {
          return font.indexOf(' ') === -1 ? font : `'${font}'`;
        })
        .join(', ');
    } else {
      retVal = value;
    }

    return retVal;
  };

  return categories.reduce((retVal, category) => {
    const keys = Object.keys(variables[category]);

    keys.forEach(key => {
      const value = valueOf(category, variables[category][key]);
      const _key = key.length > 0 ? `${category}-${key}` : `${category}`;

      retVal.push(`--zd-${_key}: ${value};`);
    });

    return retVal;
  }, []);
}