abstract-state-router
Advanced tools
Comparing version 6.0.5 to 6.1.0
@@ -695,2 +695,5 @@ 'use strict'; | ||
}; | ||
stateProviderEmitter.getActiveState = function () { | ||
return lastCompletelyLoadedState.get(); | ||
}; | ||
stateProviderEmitter.stateIsActive = function (stateName) { | ||
@@ -697,0 +700,0 @@ var parameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; |
{ | ||
"name": "abstract-state-router", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "Like ui-router, but without all the Angular. The best way to structure a single-page webapp.", | ||
@@ -9,5 +9,3 @@ "main": "bundle.js", | ||
"test": "npm run build && tape test/*.js | faucet", | ||
"coverage": "covert test/*.js", | ||
"browserwatch": "sh -c 'rollup -c -w --dev & npm run watchtests'", | ||
"watchtests": "watchify test-browser/add-color.js test/*.js -o test-browser/build.js -d" | ||
"test:browser": "npm run build && browserify test/*.js | tape-run" | ||
}, | ||
@@ -20,4 +18,3 @@ "repository": { | ||
"router", | ||
"ui-router", | ||
"browserify" | ||
"ui-router" | ||
], | ||
@@ -33,3 +30,3 @@ "author": "TehShrike", | ||
"eventemitter3": "2.0.3", | ||
"hash-brown-router": "^3.3.1", | ||
"hash-brown-router": "3.4.0", | ||
"iso-next-tick": "1.0.0", | ||
@@ -41,7 +38,6 @@ "page-path-builder": "~1.0.3", | ||
"devDependencies": { | ||
"babel-core": "6.26.0", | ||
"babel-core": "6.26.3", | ||
"babel-plugin-external-helpers": "6.22.0", | ||
"babel-preset-es2015": "6.24.1", | ||
"browserify": "14.0.0", | ||
"covert": "^1.1.0", | ||
"faucet": "0.0.1", | ||
@@ -53,8 +49,7 @@ "rollup": "0.50.0", | ||
"rollup-plugin-visualizer": "0.3.1", | ||
"rollup-watch": "4.3.1", | ||
"tap-browser-color": "0.1.2", | ||
"tape": "^4.8.0", | ||
"tape": "4.9.1", | ||
"tape-catch": "1.0.6", | ||
"watchify": "3.9.0" | ||
"tape-run": "4.0.0" | ||
} | ||
} |
@@ -57,2 +57,3 @@ abstract-state-router lets you build single-page webapps using nested routes/states. Your code doesn't reference routes directly, like `/app/users/josh`, but by name and properties, like `app.user` + `{ name: 'josh' }`. | ||
- [`makePath`](#stateroutermakepathstatename-stateparameters-options) | ||
- [`getActiveState`](#stateroutergetactivestate) | ||
- [Events](#events) | ||
@@ -251,2 +252,12 @@ - [State change](#state-change) | ||
## stateRouter.getActiveState() | ||
Returns the last completely loaded state | ||
```js | ||
// Current state name: app.tab1 | ||
// Current state params: pants: 'no' | ||
stateRouter.getActiveState() // => { name: 'app.tab1', parameters: { pants: 'no' }} | ||
``` | ||
## Events | ||
@@ -363,2 +374,2 @@ | ||
[WTFPL](http://wtfpl2.com) | ||
[WTFPL](http://wtfpl2.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
95032
14
647
372
0
+ Addedhash-brown-router@3.4.0(transitive)
- Removedhash-brown-router@3.4.1(transitive)
Updatedhash-brown-router@3.4.0