Node.prototype.reset = function (prefix) { this.prefix = prefix this.children = {} this.kind = this.types.STATIC this.handlers = new Handlers() this.numberOfChildren = 0 this.regex = null this.wildcardChild = null this.versions = SemVerStore() return this }
function Node (prefix, children, kind, handlers, regex, versions) { this.prefix = prefix || '/' this.label = this.prefix[0] this.children = children || {} this.numberOfChildren = Object.keys(this.children).length this.kind = kind || this.types.STATIC this.handlers = new Handlers(handlers) this.regex = regex || null this.wildcardChild = null this.parametricBrother = null this.versions = SemVerStore() }