{"id":19926608,"url":"https://github.com/microlinkhq/ua","last_synced_at":"2026-03-18T00:08:06.649Z","repository":{"id":216944551,"uuid":"734289277","full_name":"microlinkhq/ua","owner":"microlinkhq","description":"A simple redis primitives to incr() and top() user agents","archived":false,"fork":false,"pushed_at":"2025-11-21T07:52:51.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-27T12:25:13.526Z","etag":null,"topics":["crawler","redis","user-agent","user-agent-parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microlinkhq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-21T10:13:38.000Z","updated_at":"2025-12-17T19:08:53.000Z","dependencies_parsed_at":"2026-02-27T08:04:54.247Z","dependency_job_id":null,"html_url":"https://github.com/microlinkhq/ua","commit_stats":null,"previous_names":["microlinkhq/ua"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/microlinkhq/ua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microlinkhq","download_url":"https://codeload.github.com/microlinkhq/ua/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microlinkhq%2Fua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30636835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T23:56:54.546Z","status":"ssl_error","status_checked_at":"2026-03-17T23:56:28.952Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","redis","user-agent","user-agent-parser"],"created_at":"2024-11-12T22:29:54.266Z","updated_at":"2026-03-18T00:08:06.624Z","avatar_url":"https://github.com/microlinkhq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner.png#gh-light-mode-only\" alt=\"microlink logo\"\u003e\n  \u003cimg src=\"https://github.com/microlinkhq/cdn/raw/master/dist/logo/banner-dark.png#gh-dark-mode-only\" alt=\"microlink logo\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n![Last version](https://img.shields.io/github/tag/microlinkhq/ua.svg?style=flat-square)\n[![Coverage Status](https://img.shields.io/coveralls/microlinkhq/ua.svg?style=flat-square)](https://coveralls.io/github/microlinkhq/ua)\n[![NPM Status](https://img.shields.io/npm/dm/microlinkhq/ua.svg?style=flat-square)](https://www.npmjs.org/package/microlinkhq/ua)\n\n\u003e A simple redis primitives to incr() and top() user agents.\n\n## Install\n\n```sh\nnpm install @microlink/ua\n```\n\n## Usage\n\nFirst, initialize the library passing a Redis instance:\n\n```js\nconst Redis = require('ioredis')\nconst redis = new Redis()\nconst ua = require('@microlink/ua')(redis)\n```\n\nAfter that, the library offers the following methods:\n\n- **incr(userAgent)** — e.g. \u003csmall\u003e`ua.incr(req.headers['user-agent'])`\u003c/small\u003e\u003cbr/\u003e\nIncrement the counter associated with an user agent.\n\n- **top(n, { withScore })** — e.g. \u003csmall\u003e`ua.top(100)`\u003c/small\u003e\u003cbr/\u003e\nReturns an array of the N ranked from from top.\n\n- **flush**  — e.g. \u003csmall\u003e`ua.delete()`\u003c/small\u003e\u003cbr/\u003e\nDelete elements.\n\n## License\n\n**microlink/ua** © [microlink.io](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/ua/blob/master/LICENSE.md) License.\u003cbr\u003e\nAuthored and maintained by [Kiko Beats](https://kikobeats.com) with help from [contributors](https://github.com/microlinkhq/queue/contributors).\n\n\u003e [microlink.io](https://microlink.io) · GitHub [microlink.io](https://github.com/microlinkhq) · X [@microlinkhq](https://x.com/microlinkhq)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrolinkhq%2Fua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrolinkhq%2Fua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrolinkhq%2Fua/lists"}