Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abstract-state-router

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-state-router - npm Package Compare versions

Comparing version 7.3.1 to 7.4.0

6

bundle.js

@@ -614,5 +614,7 @@ 'use strict';

stateProviderEmitter.getActiveState = () => lastCompletelyLoadedState.get();
stateProviderEmitter.stateIsActive = (stateName, parameters = null) => {
stateProviderEmitter.stateIsActive = (stateName = null, parameters = null) => {
const currentState = lastCompletelyLoadedState.get();
const stateNameMatches = currentState.name === stateName || currentState.name.indexOf(stateName + `.`) === 0;
const stateNameMatches = currentState.name === stateName
|| currentState.name.indexOf(stateName + `.`) === 0
|| stateName === null;
const parametersWereNotPassedIn = !parameters;

@@ -619,0 +621,0 @@

{
"name": "abstract-state-router",
"version": "7.3.1",
"version": "7.4.0",
"description": "Like ui-router, but without all the Angular. The best way to structure a single-page webapp.",

@@ -5,0 +5,0 @@ "main": "bundle.js",

@@ -254,3 +254,3 @@ **[Changelog](./changelog.md) • [Join the chat on Discord](https://discord.gg/G8FrErC) • [API documentation](#api)**

## stateRouter.stateIsActive(stateName, [stateParameters])
## stateRouter.stateIsActive([stateName, [stateParameters]])

@@ -261,2 +261,4 @@ Returns true if `stateName` is the current active state, or an ancestor of the current active state...

You can pass in `null` as the state name to see if the current state is active with a given set of parameters.
```js

@@ -268,2 +270,3 @@ // Current state name: app.tab1

stateRouter.stateIsActive('app') // => true
stateRouter.stateIsActive(null, { fancy: 'yes' }) // => true
```

@@ -270,0 +273,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc