parameters: (estimator, filename)
docstring: Exports the trained model to JavaScript
docstring_summary: Exports the trained model to JavaScript
docstring_tokens: Exports the trained model to JavaScript
function: def export_model_to_js(estimator, filename):
      """Exports the trained model to JavaScript"""
      porter = Porter(estimator, language='js')
      output = porter.export(embed_data=True)
      with open(os.path.join(args.out_dir, filename), mode='w+', encoding='utf8') as f:
          f.write('export ' + output)
function_tokens: def export_model_to_js ( estimator , filename ) : porter = Porter ( estimator , language = 'js' ) output = porter . export ( embed_data = True ) with open ( os . path . join ( args . out_dir , filename ) , mode = 'w+' , encoding = 'utf8' ) as f : f . write ( 'export ' + output )