New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-typed-router

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-typed-router - npm Package Compare versions

Comparing version 0.2.21 to 0.2.22

12

lib/module.js

@@ -15,3 +15,3 @@ "use strict";

this.extendRoutes(async (routes) => {
utils_1.transformRouteNames(routes, stripAtFromName);
(0, utils_1.transformRouteNames)(routes, stripAtFromName);
let routesObjectString = '{';

@@ -21,3 +21,3 @@ let routeObjectJs = {};

const routeName = route.name;
const matchingSiblings = utils_1.extractMatchingSiblings(route, siblings);
const matchingSiblings = (0, utils_1.extractMatchingSiblings)(route, siblings);
const haveMatchingSiblings = !!(matchingSiblings === null || matchingSiblings === void 0 ? void 0 : matchingSiblings.length);

@@ -29,6 +29,6 @@ if ((route.children && !haveMatchingSiblings) ||

const parentPath = splittedPaths[splittedPaths.length - 1];
const nameKey = lodash_1.camelCase(parentPath || 'index');
const nameKey = (0, lodash_1.camelCase)(parentPath || 'index');
routesObjectString += `${nameKey}:{`;
routeObject[nameKey] = {};
childrenChunks === null || childrenChunks === void 0 ? void 0 : childrenChunks.map((r) => recursiveTypedRoutes(r, level + 1, routeObject[nameKey], utils_1.extractUnMatchingSiblings(route, siblings), nameKey, haveMatchingSiblings));
childrenChunks === null || childrenChunks === void 0 ? void 0 : childrenChunks.map((r) => recursiveTypedRoutes(r, level + 1, routeObject[nameKey], (0, utils_1.extractUnMatchingSiblings)(route, siblings), nameKey, haveMatchingSiblings));
routesObjectString += '},';

@@ -42,3 +42,3 @@ }

}
const keyName = lodash_1.camelCase(splitted.join('-')) || 'index';
const keyName = route.path === '' ? 'index' : (0, lodash_1.camelCase)(splitted.join('-')) || 'index';
routesObjectString += `'${keyName}': '${routeName}',`;

@@ -51,3 +51,3 @@ routeObject[keyName] = routeName;

const templateRoutes = `export const ${routesObjectName} = ${routesObjectString};`;
await save_1.saveRoutesFiles(filePath, templateRoutes);
await (0, save_1.saveRoutesFiles)(filePath, templateRoutes);
});

@@ -54,0 +54,0 @@ }

{
"name": "nuxt-typed-router",
"version": "0.2.21",
"version": "0.2.22",
"description": "Provide autocompletion for pages route names generated by Nuxt router",

@@ -5,0 +5,0 @@ "main": "lib/module.js",

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