(&self, pattern: String)
| 3817 | /// Search file contents with a regex pattern. |
| 3818 | #[napi] |
| 3819 | pub async fn grep(&self, pattern: String) -> napi::Result<String> { |
| 3820 | let session = self.inner.clone(); |
| 3821 | get_runtime() |
| 3822 | .spawn(async move { session.grep(&pattern).await }) |
| 3823 | .await |
| 3824 | .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))? |
| 3825 | .map_err(|e| napi::Error::from_reason(format!("{e}"))) |
| 3826 | } |
| 3827 | |
| 3828 | /// Search the web using multiple search engines. |
| 3829 | #[napi] |
no test coverage detected