react-route-generator
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -9,9 +9,9 @@ "use strict"; | ||
const cache: Record<string, (data?: object) => string> = {}; | ||
const cache: Record<string, (data?: object, options?: pathToRegexp.PathFunctionOptions) => string> = {}; | ||
const cacheLimit = 10000; | ||
let cacheCount = 0; | ||
function compilePath(path: string): pathToRegexp.PathFunction<object> { | ||
if (cache[path]) { | ||
return cache[path]; | ||
function compilePath(path: string): pathToRegexp.PathFunction { | ||
if (cache[path]) { | ||
return cache[path]; | ||
} | ||
@@ -30,3 +30,3 @@ | ||
function generatePath(path = '/', params = {}): string { | ||
return path === '/' ? path : compilePath(path)(params); | ||
return path === '/' ? path : compilePath(path)(params, { pretty: true }); | ||
} | ||
@@ -33,0 +33,0 @@ |
{ | ||
"name": "react-route-generator", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "Route generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33624