Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mason): export StringCaseExtensions (#679)
- Loading branch information
Showing
7 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import 'package:recase/recase.dart' show ReCase; | ||
|
||
/// Built-in [String] casing extensions. | ||
extension StringCaseExtensions on String { | ||
/// camelCase | ||
String get camelCase => ReCase(this).camelCase; | ||
|
||
/// CONSTANT_CASE | ||
String get constantCase => ReCase(this).constantCase; | ||
|
||
/// dot.case | ||
String get dotCase => ReCase(this).dotCase; | ||
|
||
/// Header-Case | ||
String get headerCase => ReCase(this).headerCase; | ||
|
||
/// lower case | ||
String get lowerCase => toLowerCase(); | ||
|
||
/// {{ mustache case }} | ||
String get mustacheCase => '{{ $this }}'; | ||
|
||
/// PascalCase | ||
String get pascalCase => ReCase(this).pascalCase; | ||
|
||
/// param-case | ||
String get paramCase => ReCase(this).paramCase; | ||
|
||
/// path/case | ||
String get pathCase => ReCase(this).pathCase; | ||
|
||
/// Sentence case | ||
String get sentenceCase => ReCase(this).sentenceCase; | ||
|
||
/// snake_case | ||
String get snakeCase => ReCase(this).snakeCase; | ||
|
||
/// Title Case | ||
String get titleCase => ReCase(this).titleCase; | ||
|
||
/// UPPER CASE | ||
String get upperCase => toUpperCase(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters