Skip to content

Commit

Permalink
feat: add dot to default splitters
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 16, 2021
1 parent 304a28c commit db5120f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Converts first charachter to lower case

### `splitByCase(str, splitters?)`

- Splits string by splitters (default: `['-', '_', '/']`)
- Splits string by splitters (default: `['-', '_', '/', '.]`)
- Splits when case changes from lower to upper (only rising edges)
- Case is preserved in returned value
- Is an irreversible function since splitters are omitted
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function isUppercase (char: string = '') {
return char.toUpperCase() === char
}

const STR_SPLITTERS = ['-', '_', '/']
const STR_SPLITTERS = ['-', '_', '/', '.']

export function splitByCase (str: string, splitters = STR_SPLITTERS): string[] {
const parts: string[] = []
Expand Down

0 comments on commit db5120f

Please sign in to comment.