Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 6, 2022
1 parent fe33c3e commit 16951e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/config/normalize/lib/wild_wild_path/parsing/parse.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SPECIAL_CHARS } from '../tokens/escape.js'
import { ESCAPE, SPECIAL_CHARS } from '../tokens/escape.js'
import { getStringTokenType } from '../tokens/main.js'
import { ESCAPE, SEPARATOR } from '../tokens/special.js'
import { SEPARATOR } from '../tokens/special.js'

import { normalizePath } from './normalize.js'
import { isQueryString } from './validate.js'
Expand Down
7 changes: 5 additions & 2 deletions src/config/normalize/lib/wild_wild_path/tokens/escape.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { ESCAPE, SEPARATOR } from './special.js'
import { SEPARATOR } from './special.js'

// Sepcial characters to escape
// Escaping character
export const ESCAPE = '\\'

// Special characters to escape
export const SPECIAL_CHARS = new Set([ESCAPE, SEPARATOR])

// Escape special characters
Expand Down
4 changes: 2 additions & 2 deletions src/config/normalize/lib/wild_wild_path/tokens/prop.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { objectProps } from './common.js'
import { escapeSpecialChars } from './escape.js'
import { ESCAPE, escapeSpecialChars } from './escape.js'
import { getOtherStringTokenType } from './other.js'
import { SEPARATOR, ESCAPE } from './special.js'
import { SEPARATOR } from './special.js'

// Check the type of a parsed token
const testObject = function (token) {
Expand Down
1 change: 0 additions & 1 deletion src/config/normalize/lib/wild_wild_path/tokens/special.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// All special characters
export const ESCAPE = '\\'
export const SEPARATOR = '.'

0 comments on commit 16951e1

Please sign in to comment.