~hrbrmstr/uaparserjs

ref: 0de13a7557c1f840bbfdd2db8730a3d0c346a9e0 uaparserjs/R/zzz.r -rw-r--r-- 291 bytes
0de13a75hrbrmstr updated regexes 1 year, 16 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.pkgenv <- new.env(parent=emptyenv())

.onAttach <- function(...) {

  ctx <- v8()
  ctx$source(system.file("js/bundle.js", package="uaparserjs"))
  ctx$eval(JS('var parser = uap(regexes)'))

  assign("ctx", ctx, envir=.pkgenv)

  cache <- list()

  assign("cache", cache, envir=.pkgenv)

}