UNPKG

recoder-code

Version:

πŸš€ AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

91 lines (90 loc) β€’ 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var formatDistanceLocale = { lessThanXSeconds: { one: 'ΠΏΠΎ-ΠΌΠ°Π»ΠΊΠΎ ΠΎΡ‚ сСкунда', other: 'ΠΏΠΎ-ΠΌΠ°Π»ΠΊΠΎ ΠΎΡ‚ {{count}} сСкунди' }, xSeconds: { one: '1 сСкунда', other: '{{count}} сСкунди' }, halfAMinute: 'ΠΏΠΎΠ»ΠΎΠ²ΠΈΠ½ ΠΌΠΈΠ½ΡƒΡ‚Π°', lessThanXMinutes: { one: 'ΠΏΠΎ-ΠΌΠ°Π»ΠΊΠΎ ΠΎΡ‚ ΠΌΠΈΠ½ΡƒΡ‚Π°', other: 'ΠΏΠΎ-ΠΌΠ°Π»ΠΊΠΎ ΠΎΡ‚ {{count}} ΠΌΠΈΠ½ΡƒΡ‚ΠΈ' }, xMinutes: { one: '1 ΠΌΠΈΠ½ΡƒΡ‚Π°', other: '{{count}} ΠΌΠΈΠ½ΡƒΡ‚ΠΈ' }, aboutXHours: { one: 'ΠΎΠΊΠΎΠ»ΠΎ час', other: 'ΠΎΠΊΠΎΠ»ΠΎ {{count}} часа' }, xHours: { one: '1 час', other: '{{count}} часа' }, xDays: { one: '1 Π΄Π΅Π½', other: '{{count}} Π΄Π½ΠΈ' }, aboutXWeeks: { one: 'ΠΎΠΊΠΎΠ»ΠΎ сСдмица', other: 'ΠΎΠΊΠΎΠ»ΠΎ {{count}} сСдмици' }, xWeeks: { one: '1 сСдмица', other: '{{count}} сСдмици' }, aboutXMonths: { one: 'ΠΎΠΊΠΎΠ»ΠΎ мСсСц', other: 'ΠΎΠΊΠΎΠ»ΠΎ {{count}} мСсСца' }, xMonths: { one: '1 мСсСц', other: '{{count}} мСсСца' }, aboutXYears: { one: 'ΠΎΠΊΠΎΠ»ΠΎ Π³ΠΎΠ΄ΠΈΠ½Π°', other: 'ΠΎΠΊΠΎΠ»ΠΎ {{count}} Π³ΠΎΠ΄ΠΈΠ½ΠΈ' }, xYears: { one: '1 Π³ΠΎΠ΄ΠΈΠ½Π°', other: '{{count}} Π³ΠΎΠ΄ΠΈΠ½ΠΈ' }, overXYears: { one: 'Π½Π°Π΄ Π³ΠΎΠ΄ΠΈΠ½Π°', other: 'Π½Π°Π΄ {{count}} Π³ΠΎΠ΄ΠΈΠ½ΠΈ' }, almostXYears: { one: 'ΠΏΠΎΡ‡Ρ‚ΠΈ Π³ΠΎΠ΄ΠΈΠ½Π°', other: 'ΠΏΠΎΡ‡Ρ‚ΠΈ {{count}} Π³ΠΎΠ΄ΠΈΠ½ΠΈ' } }; var formatDistance = function formatDistance(token, count, options) { var result; var tokenValue = formatDistanceLocale[token]; if (typeof tokenValue === 'string') { result = tokenValue; } else if (count === 1) { result = tokenValue.one; } else { result = tokenValue.other.replace('{{count}}', String(count)); } if (options !== null && options !== void 0 && options.addSuffix) { if (options.comparison && options.comparison > 0) { return 'слСд ' + result; } else { return 'ΠΏΡ€Π΅Π΄ΠΈ ' + result; } } return result; }; var _default = formatDistance; exports.default = _default; module.exports = exports.default;