]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: comments
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 30 Jul 2021 10:13:34 +0000 (12:13 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 30 Jul 2021 10:13:34 +0000 (12:13 +0200)
rollup.config.js
src/matcher/pathParserRanker.ts

index b012c5c20566d7d9652673a58915a2109e5b1a37..d1e16628d82c66956c906e2cd3e80d729f7b6e95 100644 (file)
@@ -167,7 +167,6 @@ function createReplacePlugin(
       replacements[key] = process.env[key]
     }
   })
-  // TODO: fix replacement thing
   return replace({
     preventAssignment: true,
     values: replacements,
index 0a848ffd12d7e8d7ddbc02e735e8ce63511e6988..6c5d0fdb12728705238dbd9a654f753a75a2a592 100644 (file)
@@ -17,10 +17,12 @@ export interface PathParser {
    * The regexp used to match a url
    */
   re: RegExp
+
   /**
    * The score of the parser
    */
   score: Array<number[]>
+
   /**
    * Keys that appeared in the path
    */
@@ -35,6 +37,7 @@ export interface PathParser {
    * no match
    */
   parse(path: string): PathParams | null
+
   /**
    * Creates a string version of the url
    *
@@ -52,15 +55,18 @@ export interface _PathParserOptions {
    * Makes the RegExp case sensitive. Defaults to false
    */
   sensitive?: boolean
+
   /**
    * Should we disallow a trailing slash. Defaults to false
    */
   strict?: boolean
+
   /**
    * Should the RegExp match from the beginning by prepending a `^` to it. Defaults to true
    * @internal
    */
   start?: boolean
+
   /**
    * Should the RegExp match until the end by appending a `$` to it. Defaults to true
    */
@@ -274,6 +280,7 @@ export function tokensToParser(
 /**
  * Compares an array of numbers as used in PathParser.score and returns a
  * number. This function can be used to `sort` an array
+ *
  * @param a - first array of numbers
  * @param b - second array of numbers
  * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
@@ -306,6 +313,7 @@ function compareScoreArray(a: number[], b: number[]): number {
 
 /**
  * Compare function that can be used with `sort` to sort an array of PathParser
+ *
  * @param a - first PathParser
  * @param b - second PathParser
  * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b