code: def js_adaptor(buffer):
      
      buffer = re.sub('true', 'True', buffer)
      buffer = re.sub('false', 'False', buffer)
      buffer = re.sub('none', 'None', buffer)
      buffer = re.sub('NaN', '"NaN"', buffer)
      return buffer
docs: convert javascript objects like true, none, NaN etc. to
      quoted word.
  
      Arguments:
          buffer: string to be converted
  
      Returns:
          string after conversion