How to use the @phensley/cldr-ext-rbnf/lib/rbnftypes.RuleType.IMPROPER_FRACTION function in @phensley/cldr-ext-rbnf

To help you get started, we’ve selected a few @phensley/cldr-ext-rbnf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phensley / cldr-engine / packages / cldr-compiler / src / rbnf / encoder.ts View on Github external
if (!comma) {
                rules.push([RuleType.PROPER_FRACTION, inst, 1]);
              }
              break;

            case '0,x':
              rules.push([RuleType.PROPER_FRACTION, inst, 1]);
              if (!period) {
                rules.push([RuleType.PROPER_FRACTION, inst, 0]);
              }
              break;

            case 'x.x':
              rules.push([RuleType.IMPROPER_FRACTION, inst, 0]);
              if (!comma) {
                rules.push([RuleType.IMPROPER_FRACTION, inst, 1]);
              }
              break;

            case 'x,x':
              rules.push([RuleType.IMPROPER_FRACTION, inst, 1]);
              if (!period) {
                rules.push([RuleType.IMPROPER_FRACTION, inst, 0]);
              }
              break;

            case 'Inf':
              rules.push([RuleType.INFINITY, inst]);
              break;

            case 'NaN':
              rules.push([RuleType.NOT_A_NUMBER, inst]);