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.1.4 to 0.1.5

12

lib/module.js

@@ -19,11 +19,13 @@ import fs from 'fs';

const recursiveTypedRoutes = route => {
const name = route.name;
if (name) routesInterfaces += `'${camelCase(name)}': '${name}',`;
const routeName = route.name;
if (route.children) {
const [_, name] = route.chunkName.split('pages/');
routesInterfaces += `${camelCase(name)}:{`;
const { length: len, [len - 1]: childChunk } = route.chunkName.split('/');
routesInterfaces += `${camelCase(childChunk)}:{`;
route.children.map(recursiveTypedRoutes);
routesInterfaces += '},';
} else if (routeName) {
const { length: len, [len - 1]: childChunk } = route.chunkName.split('/');
routesInterfaces += `'${camelCase(childChunk)}': '${routeName}',`;
routesEnum.push(`'${route.name}'`);
}
if (route.name) routesEnum.push(`'${route.name}'`);
};

@@ -30,0 +32,0 @@ routes.map(recursiveTypedRoutes);

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

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

@@ -81,3 +81,2 @@ # 🚦Typed Router Module

### _Requirements_

@@ -177,6 +176,6 @@

index: 'index',
indexCommunication: 'index-communication',
indexContent: 'index-content',
indexStatistics: 'index-statistics',
indexUsers: 'index-users',
communication: 'index-communication',
content: 'index-content',
statistics: 'index-statistics',
users: 'index-users',
},

@@ -183,0 +182,0 @@ };

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