File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 2.0.3" ,
4
4
"description" : " extracts and replaces values and IDs in URLs" ,
5
5
"main" : " src/UrlValueParser.js" ,
6
+ "types" : " url-value-parser.d.ts" ,
6
7
"scripts" : {
7
8
"test" : " ./node_modules/jasme/run.js"
8
9
},
Original file line number Diff line number Diff line change
1
+ interface Options {
2
+ /** use custom masks instead of built-in */
3
+ replaceMasks ?: string [ ] | RegExp [ ] ;
4
+ /** add your custom masks additionally to the built-in ones */
5
+ extraMasks ?: string [ ] | RegExp [ ] ;
6
+ /* when using built-in masks, count only long enough HEX values, DEFAULT: 7 */
7
+ minHexLength ?: number ;
8
+ /* when using built-in masks, count only long enough base64 values, DEFAULT: 66 */
9
+ minBase64Length ?: number ;
10
+ }
11
+
12
+ declare class UrlValueParser {
13
+ constructor ( options ?: Options ) ;
14
+
15
+ public parsePathValues ( path : string ) : { chunks : string [ ] , valueIndexes : number [ ] ; }
16
+ public replacePathValues ( path : string , replacement : string ) : string ;
17
+ }
18
+
19
+ export = UrlValueParser ;
You can’t perform that action at this time.
0 commit comments