react-route-generator
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -119,3 +119,3 @@ "use strict"; | ||
importReactRouterRows = `import { useRouteMatch } from 'react-router';\nimport { useHistory } from 'react-router';\n`; | ||
interfaceReactRouterRows = `useParams: () => P;\nuseRedirect: (inputParams: P, urlQuery?: Record<string,string>) => () => void;\n`; | ||
interfaceReactRouterRows = `useParams: () => P;\nuseRedirect: (inputParams: P, urlQuery?: Partial<Record<string, string>>) => () => void;\n`; | ||
routeReactRouterRows = `useParams: () => { | ||
@@ -122,0 +122,0 @@ const { path, params } = useRouteMatch<P>(); |
@@ -1,3 +0,3 @@ | ||
export declare type GenerateUrl = <P>(pattern: string, inputParams: P, urlQuery?: Record<string, string>) => string; | ||
export declare type GenerateUrl = <P>(pattern: string, inputParams: P, urlQuery?: Partial<Record<string, string>>) => string; | ||
declare const generateUrl: GenerateUrl; | ||
export default generateUrl; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path_to_regexp_1 = __importDefault(require("path-to-regexp")); | ||
const path_to_regexp_1 = require("path-to-regexp"); | ||
const cache = {}; | ||
@@ -14,3 +11,3 @@ const cacheLimit = 10000; | ||
} | ||
const generator = path_to_regexp_1.default.compile(path); | ||
const generator = path_to_regexp_1.compile(path); | ||
if (cacheCount < cacheLimit) { | ||
@@ -17,0 +14,0 @@ cache[path] = generator; |
{ | ||
"name": "react-route-generator", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"description": "Route generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
39060
518