• Version 5.2.12
  • Published
  • 240 kB
  • 3 dependencies
  • MIT license


npm i @formatjs/intl-pluralrules
yarn add @formatjs/intl-pluralrules
pnpm add @formatjs/intl-pluralrules


Polyfill for Intl.PluralRules



class PluralRules

class PluralRules implements Intl.PluralRules {}


    constructor(locales?: string | string[], options?: Intl.PluralRulesOptions);

      property availableLocales

      static availableLocales: Set<string>;

        property localeData

        static localeData: Record<string, PluralRulesData>;

          property polyfilled

          static polyfilled: boolean;

            property relevantExtensionKeys

            static relevantExtensionKeys: never[];

              method getDefaultLocale

              static getDefaultLocale: () => string;

                method resolvedOptions

                resolvedOptions: () => any;

                  method select

                  select: (val: number) => LDMLPluralRule;

                    method supportedLocalesOf

                    static supportedLocalesOf: (
                    locales?: string | string[],
                    options?: Pick<Intl.PluralRulesOptions, 'localeMatcher'>
                    ) => string[];

                      method toString

                      toString: () => string;


                        interface PluralRulesInternal

                        interface PluralRulesInternal extends NumberFormatDigitInternalSlots {}

                          property initializedPluralRules

                          initializedPluralRules: boolean;

                            property locale

                            locale: string;

                              property type

                              type: 'cardinal' | 'ordinal';

                                Package Files (1)

                                Dependencies (3)

                                Dev Dependencies (2)

                                Peer Dependencies (0)

                                No peer dependencies.


                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@formatjs/intl-pluralrules.

                                • Markdown
                                • HTML
                                  <a href="https://www.jsdocs.io/package/@formatjs/intl-pluralrules"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>