Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor (url, root) {
assert(url, 'url is required')
Object.assign(this, parseUrl(url))
if (this.isRoot) {
const store = new Store(this.endpoint)
define(this, underscore({store}))
} else {
define(this, {_root: root || new this.constructor(this.endpoint)})
}
}
flush () {
constructor (url, root) {
assert(url, 'url is required')
Object.assign(this, parseUrl(url))
if (this.isRoot) {
const store = new Store(this.endpoint)
define(this, underscore({store}))
} else {
define(this, {_root: root || new this.constructor(this.endpoint)})
}
}
flush () {
constructor () {
define(this, {listeners: new Set()})
}
add (path, event, callback, cancel, context) {