Skip to content

Commit

Permalink
Committed in wrong directory
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette committed Jan 16, 2025
1 parent 7f27cb8 commit 814cd61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/devtools_app_shared/lib/src/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ const tooltipWait = Duration(milliseconds: 500);
const tooltipWaitLong = Duration(milliseconds: 1000);
const tooltipWaitExtraLong = Duration(milliseconds: 1500);

/// Pluralizes a word, following english rules (1, many).
/// Pluralizes a word, following English rules (1, many).
///
/// Pass a custom named `plural` for irregular plurals:
/// `pluralize('index', count, plural: 'indices')`
/// So it returns `indices` and not `indexs`.
String pluralize(String word, int count, {String? plural}) =>
count == 1 ? word : (plural ?? '${word}s');

/// Adds "a" or "an" to a word, following English rules.
String addIndefiniteArticle(String word) =>
word.startsWith(RegExp(r'^[aeiouAEIOU]')) ? 'an $word' : 'a $word';

bool isPrivateMember(String member) => member.startsWith('_');

/// Public properties first, then sort alphabetically
Expand Down

0 comments on commit 814cd61

Please sign in to comment.