<commit_before>{cssmin} = require('ycssmin')

JSONtoCSS = (object, options) ->

  JSONtoString = (object) ->
    cssContent = ''
    queue = []
  
    for own key, value of object
      if typeof object is 'object'
        for own subKey, subValue of value
          cssContent += "#{key} {"
          if typeof subValue is 'object'
            console.log subValue
            newObject = {}
            newObject[subKey] = subValue
            queue.push JSONtoString newObject
          else
            cssContent += "#{subKey}: #{subValue};"
          cssContent += '}'

          
        
       for q in queue
         cssContent += "#{key} #{q}"

     cssContent

  JSONtoString object<commit_msg>Trying to optimize nested selectors<commit_after>{cssmin} = require('ycssmin')

JSONtoCSS = (object, options) ->

  JSONtoString = (object) ->
    cssContent = ''
    queue = []
  
    for own key, value of object
      if typeof value is 'object'
        for own subKey, subValue of value
          cssContent += "#{key} {"
          if typeof subValue is 'object'
            console.log subValue
            newObject = {}
            newObject[subKey] = subValue
            queue.push JSONtoString newObject
          else
            cssContent += "#{subKey}: #{subValue};"
          cssContent += '}'

          
        
         for q in queue
           cssContent += "#{key} #{q}"

     cssContent

  JSONtoString object
  
module.exports = JSONtoCSS
{'fraction_non_alphanumeric': 0.10497614178595774, 'fraction_numerical': 0.0, 'mean_word_length': 1.7803030303030303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2717636', 'n_tokens_mistral': 406, 'n_tokens_neox': 396, 'n_words': 117}