/// <summary> /// Transforms JavaScript via Babel. The result is not cached. Use /// <see cref="TransformFile"/> if loading from a file since this will cache the result. /// </summary> /// <param name="input">JavaScript</param> /// <param name="filename">Name of the file being transformed</param> /// <returns>JavaScript</returns> public virtual string Transform(string input, string filename = "unknown") { try { var output = _environment.ExecuteWithBabel <string>( "ReactNET_transform", input, _babelConfig, filename ); return(output); } catch (Exception ex) { throw new BabelException(ex.Message, ex); } }