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

@factor/app

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@factor/app - npm Package Compare versions

Comparing version 1.5.24 to 1.5.25

4

package.json
{
"name": "@factor/app",
"version": "1.5.24",
"version": "1.5.25",
"license": "GPL-2.0",

@@ -15,3 +15,3 @@ "publishConfig": {

},
"gitHead": "28ef0237c1e238fa7b6f87b06ff4770aea5db163"
"gitHead": "3fd3adaf05aa0bcb44c1716f26336b7fd6ad80b9"
}

@@ -167,2 +167,28 @@ import { applyFilters, runCallbacks, pushToFilter, addFilter } from "@factor/api/hooks"

/**
* Adds an array of routes to the router.
*
* @param _id A unique group identifier for the routes
* @param routeItems Array of standard routes
* @param options Optional route options
* @category app
*/
export const addContentRoutes = ({
key,
routes,
}: {
key: string
routes: RouteConfig[] | (() => RouteConfig[])
}): void => {
addFilter({
hook: "content-routes",
key,
callback: (allRoutes: RouteConfig[]): RouteConfig[] => {
const r = typeof routes === "function" ? routes() : routes
return allRoutes.concat(r)
},
})
}
/**
* Recurse through routes and child routes

@@ -232,28 +258,2 @@ * Calling a callback for each route

/**
* Adds an array of routes to the router.
*
* @param _id A unique group identifier for the routes
* @param routeItems Array of standard routes
* @param options Optional route options
* @category app
*/
export const addContentRoutes = ({
key,
routes,
}: {
key: string
routes: RouteConfig[] | (() => RouteConfig[])
}): void => {
addFilter({
hook: "content-routes",
key,
callback: (allRoutes: RouteConfig[]): RouteConfig[] => {
const r = typeof routes === "function" ? routes() : routes
return allRoutes.concat(r)
},
})
}
export const currentRoute = (): Route => {

@@ -260,0 +260,0 @@ return getRouter().currentRoute

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