Skip to content

Commit

Permalink
refactor!: Change dot case format to enum.Value => enum.value
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgnhnt96 committed Oct 15, 2021
1 parent 2a7e53c commit 1dea7d1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.1

- [BREAKING CHANGE]: change toDotCase() format to `enum.Value` to `enum.value`

# 1.0.0+3

- Update doc comments for each case to contain an example of the expected output
Expand Down
2 changes: 1 addition & 1 deletion lib/src/cases/dot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ class Dot extends ChangeCaseHelper {
String get deliminator => '.';

@override
String transform(String section, int index) => section;
String transform(String section, int index) => section.toLowerCase();
}
2 changes: 1 addition & 1 deletion lib/src/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum ChangeCaseType {
///
/// example:
///
/// `'hello World' -> 'hello.World'`
/// `'hello World' -> 'hello.world'`
/// {@endtemplate}
dot,

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: change_case
description: An extension on String to transform a string between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.
version: 1.0.0+3
version: 1.0.1
repository: https://github.com/mrgnhnt96/change_case
homepage: https://github.com/mrgnhnt96/change_case

Expand Down
2 changes: 1 addition & 1 deletion test/src/cases/dot_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void main() {
test('index 0 returns original', () {
final result = dot.transform('Hello', 0);

expect(result, 'Hello');
expect(result, 'hello');
});

test('index 1 returns original', () {
Expand Down
6 changes: 3 additions & 3 deletions test/src/change_case_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void main() {
toCamelExpect: 'hello',
toCapitalExpect: 'Hello',
toConstantExpect: 'HELLO',
toDotExpect: 'HELLO',
toDotExpect: 'hello',
toHeaderExpect: 'Hello',
toKebabExpect: 'hello',
toParamExpect: 'hello',
Expand All @@ -95,7 +95,7 @@ void main() {
toCamelExpect: 'hello',
toCapitalExpect: 'Hello',
toConstantExpect: 'HELLO',
toDotExpect: 'Hello',
toDotExpect: 'hello',
toHeaderExpect: 'Hello',
toKebabExpect: 'hello',
toParamExpect: 'hello',
Expand All @@ -117,7 +117,7 @@ void main() {
toCamelExpect: 'hellO',
toCapitalExpect: 'Hell O',
toConstantExpect: 'HELL_O',
toDotExpect: 'hell.O',
toDotExpect: 'hell.o',
toHeaderExpect: 'Hell-O',
toKebabExpect: 'hell-o',
toParamExpect: 'hell-o',
Expand Down

0 comments on commit 1dea7d1

Please sign in to comment.