{"_id":"@telegram.ts/collection","_rev":"27-6b92a1e47fe4f2cc33d76e4169b85075","name":"@telegram.ts/collection","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@telegram.ts/collection","version":"1.0.0","keywords":["javascript","typescript","collection","library","sempai-07"],"author":{"name":"Sempai","email":"zadmanthegreat@gmail.com"},"_id":"@telegram.ts/collection@1.0.0","maintainers":[{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"}],"dist":{"shasum":"53ee1422ff8eac71de75ee9207aee6719d69a863","tarball":"https://registry.npmjs.org/@telegram.ts/collection/-/collection-1.0.0.tgz","fileCount":9,"integrity":"sha512-akP3aHD+U/JBk8by4OKXePGvxywPycBaxBhBmvZIm1VnbHL85LU8VNM3iQZs6VVpS9PdtXYYgtwfhndQ9Rv0/Q==","signatures":[{"sig":"MEYCIQDQzkAsbSJdAWOFGLlPKMxoqMXvWUqWIX+5XDWegTw+hgIhAJuaToj/PTPcttXibh3gq58Cv6yr5xe0nJoFRLdSedXK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46136},"main":"./dist/index.js","types":"./dist/index.d.ts","typing":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"a415f6343f1dbbc1d56d6d07c9ee1feeec2042fd","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"},"_npmVersion":"10.2.4","description":"Utility data structure used in telegramsjs","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/collection_1.0.0_1711208625597_0.8611388597058611","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@telegram.ts/collection","version":"1.1.0","keywords":["javascript","typescript","collection","library","sempai-07"],"author":{"name":"Sempai","email":"zadmanthegreat@gmail.com"},"_id":"@telegram.ts/collection@1.1.0","maintainers":[{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"}],"dist":{"shasum":"fe54b55669d65f74a27ddacae8a3113acf84de19","tarball":"https://registry.npmjs.org/@telegram.ts/collection/-/collection-1.1.0.tgz","fileCount":9,"integrity":"sha512-Uk4Tz6jNps8rZfSbeRkW9OJkmqL8V1IZDGa+yGtkP+nR5idIPqf4qL7tILSZn4EZ3YresIIdrh3AwzuXmNWLiA==","signatures":[{"sig":"MEUCIHpL1ZYifYqTNE6YnHqNDN7P+n5egAKYqHlTzmrdJbVsAiEA1hCgNZTcSpefAg7+nvxF/a7qyyM3CQzFtRs5vV65Ibk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31948},"main":"./dist/index.js","types":"./dist/index.d.ts","typing":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"09221e7873c7cf9df581d046329c578e19076cbb","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"},"_npmVersion":"10.2.4","description":"Utility data structure used in telegramsjs","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/collection_1.1.0_1714657701265_0.19179798016472893","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@telegram.ts/collection","version":"2.0.0","keywords":["javascript","typescript","collection","library","sempai-07"],"author":{"name":"Sempai","email":"zadmanthegreat@gmail.com"},"_id":"@telegram.ts/collection@2.0.0","maintainers":[{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"}],"homepage":"https://telegramsjs.vercel.app/","dist":{"shasum":"82c860261dbcf7af011ec0e2f8427baca87b0b56","tarball":"https://registry.npmjs.org/@telegram.ts/collection/-/collection-2.0.0.tgz","fileCount":9,"integrity":"sha512-juJcH8jdV/8fgBCh2m+dB2+D9nna2kh/9SJd14LVq9ln6W92OJ/kFMH7O+YCwR4KQz7RlDNbGzr5ZxAXy83gtA==","signatures":[{"sig":"MEQCIDauBHc+MR9zNJL2eHUB4/28q0L7V4builAQ8k/cjfIYAiBycyuDonu0B9vIOr8D7if/ELBMBEXtoPTUG3uqew9p/Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58360},"main":"./dist/index.js","types":"./dist/index.d.ts","typing":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"7b189e095be3ef70ef21787dab0416f8a34b0d6d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"},"_npmVersion":"11.6.2","description":"Utility data structure used in telegramsjs","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.0.2"},"_npmOperationalInternal":{"tmp":"tmp/collection_2.0.0_1765746105425_0.5939644639965138","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@telegram.ts/collection","version":"2.0.1","description":"Utility data structure used in telegramsjs","main":"./dist/index.js","typing":"./dist/index.d.ts","exports":{".":{"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"}}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["javascript","typescript","collection","library","sempai-07"],"homepage":"https://telegramsjs.vercel.app/","author":{"name":"Sempai","email":"zadmanthegreat@gmail.com"},"devDependencies":{"@types/node":"^25.0.2","typescript":"^5.9.3"},"gitHead":"7b189e095be3ef70ef21787dab0416f8a34b0d6d","types":"./dist/index.d.ts","_id":"@telegram.ts/collection@2.0.1","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-z37efUjkn23kLbfwufJ7qH0oXE5pyAs9swII7kX026GL6ipD/7NWFqJZZuz9W6PfwSe+u6N8DV0kNvgFp5z4xA==","shasum":"0e6398da4a9295164af88124fdc1d9c714015bed","tarball":"https://registry.npmjs.org/@telegram.ts/collection/-/collection-2.0.1.tgz","fileCount":9,"unpackedSize":58454,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHPpTl32PMuv3yxJ3q5lKKx3lqROybofuShM06vLP9L2AiEA9FZhZfI4bGTXMeQi9eJgUNaVAWFnKUq5CnZIOYSW5sg="}]},"_npmUser":{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"},"directories":{},"maintainers":[{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/collection_2.0.1_1765792586244_0.4347813551339039"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-23T15:43:45.518Z","modified":"2025-12-15T09:56:26.598Z","0.2.3":"2023-05-16T16:36:13.445Z","0.2.4":"2023-05-16T16:39:02.115Z","0.2.5":"2023-05-16T16:44:55.682Z","0.2.6":"2023-05-16T16:47:43.804Z","0.2.7":"2023-05-16T17:05:51.143Z","0.2.8":"2023-05-16T17:09:04.698Z","0.2.9":"2023-05-16T17:32:47.799Z","0.3.0":"2023-05-16T17:54:57.856Z","0.3.1":"2023-05-21T11:55:15.083Z","0.3.2":"2023-05-21T12:00:46.184Z","0.4.0":"2023-05-28T06:27:07.068Z","0.4.5":"2023-06-07T06:26:39.798Z","0.5.1":"2023-06-21T18:22:57.663Z","1.0.0":"2024-03-23T15:43:45.770Z","1.1.0":"2024-05-02T13:48:21.441Z","2.0.0":"2025-12-14T21:01:45.565Z","2.0.1":"2025-12-15T09:56:26.411Z"},"author":{"name":"Sempai","email":"zadmanthegreat@gmail.com"},"homepage":"https://telegramsjs.vercel.app/","keywords":["javascript","typescript","collection","library","sempai-07"],"description":"Utility data structure used in telegramsjs","maintainers":[{"name":"crazy-sempai07","email":"suhozadvova7@gmail.com"}],"readme":"# @telegram.ts/collection\n\n[![NPM Version](https://img.shields.io/npm/v/@telegram.ts/collection)](https://www.npmjs.com/package/@telegram.ts/collection)\n[![NPM Downloads](https://img.shields.io/npm/dt/@telegram.ts/collection.svg?maxAge=3600)](https://www.npmjs.com/package/@telegram.ts/collection)\n[![License](https://img.shields.io/npm/l/@telegram.ts/collection)](https://github.com/telegramsjs/plugins/blob/main/LICENSE)\n\nA powerful Map-based data structure with additional utility methods. This library extends JavaScript's native `Map` with methods inspired by Arrays, making it perfect for managing collections of data with unique identifiers.\n\n## Features\n\n- 🚀 **Extends Native Map** - Full compatibility with JavaScript's Map API\n- 📦 **Rich Utility Methods** - 50+ methods for working with collections\n- 🎯 **Type-Safe** - Written in TypeScript with full type inference\n- ⚡ **Performance Optimized** - Caching and efficient iteration patterns\n- 🔗 **Chainable API** - Fluent interface for method chaining\n- 🛠️ **Array-like Methods** - Familiar methods like `filter`, `map`, `reduce`, and more\n\n## Installation\n\n```bash\nnpm install @telegram.ts/collection\n```\n\n```bash\nyarn add @telegram.ts/collection\n```\n\n```bash\npnpm add @telegram.ts/collection\n```\n\n## Quick Start\n\n```typescript\nimport { Collection } from \"@telegram.ts/collection\";\n\n// Create a collection\nconst users = new Collection<string, User>();\n\n// Add items\nusers.set(\"123\", { id: \"123\", name: \"Alice\", age: 25 });\nusers.set(\"456\", { id: \"456\", name: \"Bob\", age: 30 });\n\n// Use utility methods\nconst adults = users.filter((user) => user.age >= 18);\nconst names = users.map((user) => user.name);\nconst oldest = users.reduce((prev, curr) =>\n  curr.age > prev.age ? curr : prev,\n);\n\n// Chain operations\nusers\n  .filter((user) => user.age > 20)\n  .each((user) => console.log(user.name))\n  .map((user) => user.age);\n```\n\n## Credits\n\nThis library is inspired by [`@discordjs/collection`](https://github.com/discordjs/discord.js/tree/main/packages/collection) and adapted for telegram.ts use cases.\n\n## LICENSE\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/telegramsjs/collection/blob/main/LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please create a `GitHub` issue or submit a pull request. Additionally, feel free to reach out to me on Telegram via my username `@SempaiJS` or on Discord using my username `sempaika_chess`.\n","readmeFilename":"README.md"}