npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aceramica/nuxt-shared

v1.0.9

Published

Общие utils для фронтенд сервисов aceramica на Nuxt 3

Readme

NuxtShared A-Ceramica

Nuxt 3 модуль c переиспользуемыми utils для проектов A-Ceramica

Utils

  • currentDate() - возвращает текущую дату в формате dd.mm.yyyy
    • Пример использования:
      currentDate() // '01.01.2025'
  • currentDateTime() - возвращает текущую дату и время в формате dd.mm.yyyy HH:mm
    • Пример использования:
      currentDateTime() // '01.01.2025 12:00'
  • currentYear() - возвращает текущий год в формате yyyy
    • Пример использования:
      currentYear() // '2025'
  • declensionOfNumber - возвращает форму существительного в зависимости от числа
    • Пример использования:
      const titles = ['товар', 'товара', 'товаров']
      declensionOfNumber(22, titles) // 'товара'
  • formattingDate - форматирует дату в формате dd.mm.yyyy HH:mm (по умолчанию UTC Москва, можно указать часовой пояс)
    • Пример использования:
      formattingDate(new Date()) // '01.01.2025 12:00'
      formattingDate('2024-11-19T08:44:26.000000Z', '+03:00') // '19.11.2024 11:44'
  • formattingDateFeed - форматирует дату в формате yyyy-mm-ddTHH:mm:ss+XX:XX (нужно для фидов и sitemap, по умолчанию UTC Москва)
    • Пример использования:
      formattingDateFeed(new Date()) // '2025-01-01T12:00:00+00:00'
      formattingDateFeed('2024-11-19T08:44:26.000000Z', '+03:00') // '2024-11-19T11:44:26+03:00'
  • formattingPrice - форматирует цену в строку с разделителями тысяч и заданным количеством знаков после запятой
    • Пример использования:
      formattingPrice(1234) // '1 234.00'
      formattingPrice(1234.5) // '1 234.50'
      formattingPrice(1234.567, 1) // '1 234.6'
      formattingPrice(1234.567, 0) // '1 234'
      formattingPrice('5678.9', 2) // '5 678.90'
  • scrollToElement - прокручивает страницу до элемента с заданным id
    • Пример использования:
      scrollToElement('elementId') // прокручивает страницу до элемента с id='elementId'
  • transliterate - транслитерация с русского на английский язык
    • Пример использования:
      transliterate('Привет, мир!') // 'Privet, mir!'
  • truncateString - обрезает строку до указанного размера
    • Пример использования:
      truncateString('Если строка очень длинная, и не помещается в блок, она будет обрезана до указанного размера', 20) // 'Если строка очень дл...'

Установка в свой проект

  1. Создаём файл .npmrc в корне проекта со следующим содержимым
    # Токен создаётся в настройках проекта в GitLab (Settings -> Access Tokens)
    //gitlab.a-ceramica.ru/api/v4/projects/7/packages/npm/:_authToken=ТОКЕН_ИЗ_GITLAB
    @aceramica:registry=https://gitlab.a-ceramica.ru/api/v4/projects/7/packages/npm/
  2. В консоли выполняем команду
    npm install @aceramica/nuxt-shared
  3. D nuxt.config.ts добавляем в modules
    modules: [
      '@aceramica/nuxt-shared'
    ]

Вклад в проект

# Установка зависимостей
npm install

# Генерация типов
npm run dev:prepare

# Запуск playground для разработки
npm run dev

# Билд playground
npm run dev:build

# Запуск линтера (ESLint)
npm run lint

# ЗАпуск тестов (Vitest)
npm run test
npm run test:watch

# Релиз новой версии
npm run release