id
int64 0
3.78k
| code
stringlengths 13
37.9k
| declarations
stringlengths 16
64.6k
|
---|---|---|
800 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = (
// eslint-disable-next-line no-unused-vars
count: number,
// eslint-disable-next-line no-unused-vars
options?: FormatDistanceFnOptions
) => string |
801 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
802 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
other: string
} |
803 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: {
standalone: string
withPrepositionAgo: string
withPrepositionIn: string
}
dual: string
other: string
} |
804 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
standalone: string | FormatDistanceTokenForm
withPreposition: string | FormatDistanceTokenForm
} |
805 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
one: string | Tense
twoFour: string
other: string
} |
806 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
807 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
oneWithSuffix?: string
otherWithSuffix?: string
} |
808 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
standalone: Amount | string
withPreposition: Amount | string
} |
809 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
810 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
811 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
812 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
813 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
814 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
other: string
} |
815 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
twenty?: string
other: string
} |
816 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
817 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: Translater
other: Translater
} |
818 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
819 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
820 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
past: string
present: string
future: string
} |
821 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
one?: Tense
twoFour?: Tense
other: Tense
} |
822 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
823 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
one?: Tense
other: Tense
} |
824 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
825 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
826 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
827 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
828 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| {
type?: undefined
regular: Plural
past?: Plural
future?: Plural
}
| {
type: 'weeks'
one: string
other: string
}
// eslint-disable-next-line no-unused-vars
| ((options?: FormatDistanceFnOptions) => string) |
829 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = string |
830 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
831 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
832 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = (
// eslint-disable-next-line no-unused-vars
count: number,
// eslint-disable-next-line no-unused-vars
options?: FormatDistanceFnOptions
) => string |
833 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = string | Tense | Plural |
834 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two: string
threeToTen: string
other: string
} |
835 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two: string
other: string
} |
836 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| {
type?: undefined
one: Tense
few: Tense
many: Tense
}
| {
type: 'other'
other: Tense
} |
837 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
one: string
other: string
// eslint-disable-next-line no-unused-vars
futureTense: (text: string) => string
} |
838 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
oneWithSuffix?: string
otherWithSuffix?: string
} |
839 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: {
standalone: string
withPrepositionAgo: string
withPrepositionIn: string
}
dual: string
other: string
} |
840 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
841 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
842 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
two: string
threeToTen: string
other: string
} |
843 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue = {
standalone: Plural | string
withPreposition: Plural | string
} |
844 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
845 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
846 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
847 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
eleven?: string
other: string
} |
848 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
849 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
850 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
851 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
852 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
853 | function declensionGroup(
scheme: FormatDistanceTokenValue,
count: number
): string | Tense {
if (count === 1) {
return scheme.one
}
const rem100 = count % 100
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other
}
const rem10 = rem100 % 10
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour
}
return scheme.other
} | type FormatDistanceTokenValue =
| string
| {
one: {
standalone: string
withPrepositionAgo: string
withPrepositionIn: string
}
dual: string
other: string
} |
854 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
855 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
856 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
857 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
858 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
859 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
860 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
861 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
standalone: Plural | string
withPreposition: Plural | string
} |
862 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
two: string
threeToTen: string
other: string
} |
863 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
864 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
865 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
866 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
867 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
868 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
869 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
870 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
871 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
872 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = Plural | Tense |
873 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
two: string
threeToTen: string
other: string
} |
874 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: {
standalone: string
withPrepositionAgo: string
withPrepositionIn: string
}
dual: string
other: string
} |
875 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = (
// eslint-disable-next-line no-unused-vars
count: number,
// eslint-disable-next-line no-unused-vars
options?: FormatDistanceFnOptions
) => string |
876 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
877 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
other: string
} |
878 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: {
standalone: string
withPrepositionAgo: string
withPrepositionIn: string
}
dual: string
other: string
} |
879 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
standalone: string | FormatDistanceTokenForm
withPreposition: string | FormatDistanceTokenForm
} |
880 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
one: string | Tense
twoFour: string
other: string
} |
881 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
882 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
oneWithSuffix?: string
otherWithSuffix?: string
} |
883 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
standalone: Amount | string
withPreposition: Amount | string
} |
884 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
885 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
886 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
887 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
888 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
889 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
other: string
} |
890 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
two?: string
twenty?: string
other: string
} |
891 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
892 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: Translater
other: Translater
} |
893 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
894 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
895 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
past: string
present: string
future: string
} |
896 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
one?: Tense
twoFour?: Tense
other: Tense
} |
897 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |
898 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue = {
one?: Tense
other: Tense
} |
899 | function declension(
scheme: FormatDistanceTokenValue,
count: number,
time: keyof Tense
) {
const group = declensionGroup(scheme, count)
const finalText = typeof group === 'string' ? group : group[time]
return finalText.replace('{{count}}', String(count))
} | type FormatDistanceTokenValue =
| string
| {
one: string
other: string
} |