{"_id":"@byeto/nuxt-utils-layer","_rev":"2-27a35b1af5bed8cf97e25029ab14554b","name":"@byeto/nuxt-utils-layer","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@byeto/nuxt-utils-layer","version":"1.0.0","_id":"@byeto/nuxt-utils-layer@1.0.0","maintainers":[{"name":"mansour-marzban","email":"marzban.dev@gmail.com"}],"dist":{"shasum":"ab0d2462e116466c75d11b634d3cf321011b1b5c","tarball":"https://registry.npmjs.org/@byeto/nuxt-utils-layer/-/nuxt-utils-layer-1.0.0.tgz","fileCount":58,"integrity":"sha512-X1wxQXckRBvQhh2DDPtD3tPFKy+np67KwCGBBdD3gMGTfGnpa2C1PTCoq1TBq4eCjQWCSBAddtzbCQMf/pps7A==","signatures":[{"sig":"MEUCIDL4AWYRbHUF+txsIK8OwPvV1oLB7LoBSaZN+EmpGgO0AiEAl+ZWHk2pG/2MqJVfrTi5LSk6HQtK4H8e71DIL1vRY2I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2037445},"main":"./nuxt.config.ts","type":"module","gitHead":"b73bcabd9fb68e81538b87bcc1c2145a993a4223","scripts":{"dev":"nuxi dev .playground","gdoc":"documentation build **/*.ts --parse-extension ts -f html -o docs && bun scripts/replace-documentation-theme/index.ts","lint":"eslint .","build":"nuxt build .playground","preview":"nuxt preview .playground","generate":"nuxt generate .playground","dev:prepare":"nuxt prepare .playground"},"_npmUser":{"name":"mansour-marzban","email":"marzban.dev@gmail.com"},"_npmVersion":"11.6.2","description":"This repository is a **Nuxt layer** that provides a collection of utilities, composables, and plugins commonly used across projects.   By installing this layer, you can keep your Nuxt apps clean and DRY while reusing shared logic.","directories":{},"_nodeVersion":"22.21.1","dependencies":{"mitt":"^3.0.1","@vueuse/nuxt":"^13.7.0","@vueuse/router":"^13.7.0","date-fns-jalali":"^4.1.0-0","@vueuse/integrations":"^13.7.0","@internationalized/date":"^3.8.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"latest","nuxt":"^4.0.3","eslint":"^9.33.0","typescript":"^5.9.2","@nuxt/eslint":"latest","documentation":"^14.0.3","semantic-release":"^25.0.1","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.1","@semantic-release/github":"^12.0.1","@semantic-release/changelog":"^6.0.3"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-utils-layer_1.0.0_1762159830409_0.27708155619889174","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@byeto/nuxt-utils-layer","version":"2.0.0","main":"./nuxt.config.ts","publishConfig":{"access":"public"},"scripts":{"dev":"nuxi dev .playground","dev:prepare":"nuxt prepare .playground","build":"nuxt build .playground","generate":"nuxt generate .playground","preview":"nuxt preview .playground","lint":"eslint .","gdoc":"documentation build **/*.ts --parse-extension ts -f html -o docs && bun scripts/replace-documentation-theme/index.ts"},"dependencies":{"@internationalized/date":"^3.10.0","@vueuse/integrations":"^13.9.0","@vueuse/nuxt":"^13.9.0","@vueuse/router":"^13.9.0","date-fns-jalali":"^4.1.0-0","mitt":"^3.0.1"},"devDependencies":{"@nuxt/eslint":"latest","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.2","@semantic-release/npm":"^13.1.2","documentation":"^14.0.3","eslint":"^9.39.1","nuxt":"^4.2.1","semantic-release":"^25.0.2","typescript":"^5.9.3","vue":"latest"},"type":"module","gitHead":"b7a3464f567eec43cee8f548bf9580b22c181f48","_id":"@byeto/nuxt-utils-layer@2.0.0","description":"This repository is a **Nuxt layer** that provides a collection of utilities, composables, and plugins commonly used across projects.   By installing this layer, you can keep your Nuxt apps clean and DRY while reusing shared logic.","_nodeVersion":"22.21.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-nKwUTljISsuS0WVmfMGocbgQMa+8/HS2y+Y7rzQWpOZ4c4CpfulERm3TGGShWWgJYI+rV5xt6wFqwblSXydsCg==","shasum":"b926a168bdbaa6f86a44f9b435b6fda56519a37f","tarball":"https://registry.npmjs.org/@byeto/nuxt-utils-layer/-/nuxt-utils-layer-2.0.0.tgz","fileCount":30,"unpackedSize":484862,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHfB6Q1adWAQC9c/h8nieB1kY3YX0hUTQ4C71KAAsiT2AiEAnXPsH1CucfGITqsqGzSLERKMhThmduEgYOiUYVmISxw="}]},"_npmUser":{"name":"mansour-marzban","email":"marzban.dev@gmail.com"},"directories":{},"maintainers":[{"name":"mansour-marzban","email":"marzban.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nuxt-utils-layer_2.0.0_1764401921547_0.6376975992679756"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-03T08:50:30.324Z","modified":"2025-11-29T07:38:41.949Z","1.0.0":"2025-11-03T08:50:30.731Z","2.0.0":"2025-11-29T07:38:41.754Z"},"description":"This repository is a **Nuxt layer** that provides a collection of utilities, composables, and plugins commonly used across projects.   By installing this layer, you can keep your Nuxt apps clean and DRY while reusing shared logic.","maintainers":[{"name":"mansour-marzban","email":"marzban.dev@gmail.com"}],"readme":"# Nuxt Utilities Layer\n\nThis repository is a **Nuxt layer** that provides a collection of utilities, composables, and plugins commonly used across projects.  \nBy installing this layer, you can keep your Nuxt apps clean and DRY while reusing shared logic.\n\n## 📦 Installation\n\nFirst install dependencies:\n\n```bash\nnpm i @internationalized/date @vueuse/integrations @vueuse/nuxt @vueuse/router date-fns-jalali mitt\n```\n\nAdd this layer to your Nuxt project:\n\n```ts\nexport default defineNuxtConfig({\n    extends: [\"github:Byeto-Company/nuxt-utils-layer\"],\n});\n```\n\n## 📂 Structure\n\nThis layer contains:\n\n- **Utilities (`utils/`)**\n\n- **Composables (`composables/`)**\n\n- **Plugins (`plugins/`)**\n\n## 🛠️ Utilities\n\n- **`byteFormatter`**  \n  Formats file sizes into human-readable units (e.g., `1024 → \"1 KB\"`).\n\n- **`ensureFileExists`**  \n  Ensures a file exists at a given path, creating it with optional content if missing.\n\n- **`formatAgent`**  \n  Detects client info (OS, browser, device type, etc).\n\n- **`formatPrice`**  \n  Formats numbers into localized Persian prices (e.g., `1000 → \"1,000 تومان\"`).\n\n- **`isImage`**  \n  Checks if a file name has an image extension.\n\n- **`toEnglishNumber`**  \n  Converts Persian/Arabic numerals into English digits.\n\n- **`toPersianDateString`**  \n  Converts JavaScript `Date` into a formatted Persian date string (with optional time).\n\n## 🧩 Composables\n\n- **`useBaseUrl`**  \n  Returns API base URL from `runtimeConfig`.\n\n- **`useHistoryState`**  \n  Syncs reactive state with browser history (back/forward navigation).\n\n- **`useObjectTrack`**  \n  Tracks changes inside objects reactively.\n\n- **`usePersianTimeAgo`**  \n  Returns human-readable Persian \"time ago\" strings (e.g., `\"۵ دقیقه پیش\"`).\n\n- **`useTimer`**  \n  Provides an interval timer composable (start, stop, reset).\n\n- **`useAppBreakPoints`**  \n  Helper for detecting mobile - tablet - laptop - desktop breakpoints easily\n\n- **`useHaveOverflow`**  \n  Detecting that is given element have vertical overflow or not\n\n## 🔌 Plugins\n\n- **`Event Bus`**  \n  A global event bus for cross-component communication.\n","readmeFilename":"README.md"}