R/zzz.R

Defines functions .onLoad .onAttach

storage_env <- new.env(hash = TRUE)

.onAttach <- function(libname, pkgname) {
  shiny::registerInputHandler("sigmajsParseJS", function(data, ...) {
    jsonlite::fromJSON(jsonlite::toJSON(data, auto_unbox = TRUE))
  }, force = TRUE)
}

.onLoad <- function(libname, pkgname) {
  shiny::registerInputHandler("sigmajsParseJS", function(data, ...) {
    jsonlite::fromJSON(jsonlite::toJSON(data, auto_unbox = TRUE))
  }, force = TRUE)
}
JohnCoene/sigmajs documentation built on Feb. 1, 2021, 12:12 p.m.