| NS {tabler} | R Documentation |
Namespace an Id
Description
Prefixes an id with a namespace, mirroring the id-prefixing
behaviour of shiny::NS() without depending on shiny or its
module system.
Usage
NS(namespace, id = NULL)
Arguments
namespace |
Namespace prefix. |
id |
Id to namespace. If missing, returns a function that namespaces
any id it is given (as shiny::NS() does).
|
Value
If id is given, a namespaced id (character string).
Otherwise, a function that namespaces any id passed to it.
Examples
ns <- NS("mymodule")
ns("button") # "mymodule-button"
NS("mymodule", "button") # "mymodule-button"