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.0 to 1.5.4

8

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

@@ -8,5 +8,3 @@ "publishConfig": {

},
"factor": {
"_id": "app"
},
"factor": {},
"dependencies": {

@@ -18,3 +16,3 @@ "qs": "^6.6.0",

},
"gitHead": "dece0baedc5818060c224378d61f963e74a3087a"
"gitHead": "41692117e7dcba394dec21ba8046b3e40a8bd276"
}

@@ -6,3 +6,3 @@ import { applyFilters, runCallbacks, pushToFilter, addFilter } from "@factor/api/hooks"

import qs from "qs"
import { uniq } from "@factor/api"
Vue.use(VueRouter)

@@ -65,2 +65,45 @@

/**
* Pull routes for sitemap out of a router config
*/
export const getRouterPaths = (routes: RouteConfig[], parent = ""): string[] => {
let out: string[] = []
routes
.filter(_ => _.path !== "*")
.forEach(_ => {
if (_.path) {
let _p = _.path
if (parent && !_.path.startsWith("/")) {
_p = `${parent}/${_.path}`
} else if (parent && _.path == "/") {
_p = parent
}
out.push(_p)
}
if (_.children) {
out = [...out, ...getRouterPaths(_.children, _.path)]
}
})
return out
}
/**
* get statically assigned routes
* then remove duplicated and dynamic routes (which include a colon (:))
*/
export const getKnownRoutePaths = (): string[] => {
const contentRoutes = applyFilters("content-routes", [])
const theRoutes = uniq(getRouterPaths(contentRoutes)).filter((fullPath: string) => {
return !fullPath.includes(":")
})
return theRoutes
}
/**
* Creates the Vue Router instance

@@ -67,0 +110,0 @@ * @library vue-router

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