public static RavenJObject Transform(string transformScript, RavenJObject input) { if (jint == null) { throw new InvalidOperationException("Jint must be initialized."); } jint.ResetSteps(); var jsObject = ToJsObject(jint.Global, input); var jsObjectTransformed = jint.CallFunction("Transform", jsObject) as JsObject; return(jsObjectTransformed != null?ConvertReturnValue(jsObjectTransformed) : null); }