@hellotext/hellotext
Version:
Hellotext JavaScript Client
30 lines (22 loc) • 603 B
JavaScript
import { Configuration } from '../core'
import { Cookies } from './cookies'
import { Query } from './query'
class Session {
static
static
static get session() {
return this.
}
static set session(value) {
this.
Cookies.set('hello_session', value)
}
static initialize() {
this.
this.session = Configuration.session || this.
if (!this.session && Configuration.autoGenerateSession) {
this.session = crypto.randomUUID()
}
}
}
export { Session }