boring-router
Advanced tools
Comparing version 0.3.0-alpha.36 to 0.3.0-alpha.37
@@ -16,2 +16,5 @@ export declare type HistoryChangeCallbackRemovalHandler = () => void; | ||
listen(callback: HistoryChangeCallback<TEntryId, TData>): HistoryChangeCallbackRemovalHandler; | ||
readonly ref: string; | ||
readonly index: number; | ||
readonly length: number; | ||
abstract getHRefByRef(ref: string): string; | ||
@@ -18,0 +21,0 @@ abstract getRefByHRef(href: string): string; |
@@ -14,2 +14,11 @@ "use strict"; | ||
} | ||
get ref() { | ||
return getActiveHistoryEntry(this.snapshot).ref; | ||
} | ||
get index() { | ||
return getActiveHistoryEntryIndex(this.snapshot); | ||
} | ||
get length() { | ||
return this.snapshot.entries.length; | ||
} | ||
emitChange(snapshot) { | ||
@@ -16,0 +25,0 @@ for (let callback of this.changeCallbackSet) { |
{ | ||
"name": "boring-router", | ||
"version": "0.3.0-alpha.36", | ||
"version": "0.3.0-alpha.37", | ||
"description": "A light-weight, type-safe, yet reactive router service using MobX.", | ||
@@ -40,3 +40,3 @@ "repository": { | ||
}, | ||
"gitHead": "f13e5c9589a987a1697772efeff1fddea17a9e28" | ||
"gitHead": "b0bad124450ece25311a053abbf94bf69bcbfae0" | ||
} |
@@ -35,2 +35,14 @@ export type HistoryChangeCallbackRemovalHandler = () => void; | ||
get ref(): string { | ||
return getActiveHistoryEntry(this.snapshot).ref; | ||
} | ||
get index(): number { | ||
return getActiveHistoryEntryIndex(this.snapshot); | ||
} | ||
get length(): number { | ||
return this.snapshot.entries.length; | ||
} | ||
abstract getHRefByRef(ref: string): string; | ||
@@ -37,0 +49,0 @@ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
175176
3793
1