| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/fuse.R |
| 3 |
\name{get_context} |
| 4 |
\alias{get_context} |
| 5 |
\title{Get the \code{fuse()} context} |
| 6 |
\usage{ |
| 7 |
get_context(item = NULL) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{item}{The name of the context item.} |
| 11 |
} |
| 12 |
\value{ |
| 13 |
If the \code{item} is provided, return its value in the context. If |
| 14 |
\code{NULL}, the whole context (an environment) is returned. |
| 15 |
} |
| 16 |
\description{ |
| 17 |
A helper function to query the \code{\link[=fuse]{fuse()}} context (such as the input file path |
| 18 |
or the output format name) when called inside a code chunk. |
| 19 |
} |
| 20 |
\examples{ |
| 21 |
litedown::get_context("input") |
| 22 |
litedown::get_context("format") |
| 23 |
names(litedown::get_context()) # all available items |
| 24 |
} |