Skip to content
pubscout

pluralize

0.0.8, released 3 years ago by turingdeal.com

Pluralize and singularize any word and check if it is singular or plural.

WASM-ready
$ flutter pub add pluralize
Source repository

What it does

A utility package that lets you check whether a word is singular or plural. It can also convert words between singular and plural forms, supporting irregular and uncountable words.

AI-written summary of version 0.0.8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to dynamically pluralize or singularize words in your app text.
  • You want to validate if a given word is singular or plural.

Skip it when

  • You require complex, multi-language localization rules beyond English pluralization adaptations.
  • You need extensive test coverage for every edge case of irregular words.

Strengths

  • Simple API with clear methods like plural, singular, isSingular, and isPlural.
  • Supports irregular and uncountable words.

Weaknesses

  • Tests do not cover all possible cases.
  • May not support all irregular and uncountable words out of the box.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

none

final pluralize = Pluralize();

assert(pluralize.isPlural('cats'));
assert(pluralize.plural('cat') == 'cats');
assert(pluralize.singular('bird') == 'bird');

Alternatives

Packages that do the same job and could replace pluralize.

  • profanity_filter

    Check and censor strings against profanity and obscene words with a built-in English list.

  • string_contains

    String scanner extensions and widgets to detect and clean bad words, URLs, emails, phones, and tags.

  • hex

    Provides simple HEX.encode and HEX.decode functions for converting between byte lists and hexadecimal strings.

  • bad_words

    A Dart filter to check if a string contains English bad words and clean them.