{"id":19788451,"url":"https://github.com/ashiknesin/closest-link","last_synced_at":"2025-08-05T22:12:54.012Z","repository":{"id":57200622,"uuid":"94069985","full_name":"AshikNesin/closest-link","owner":"AshikNesin","description":"Find closest hyperlink in DOM element","archived":false,"fork":false,"pushed_at":"2017-06-12T10:03:19.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T10:54:35.803Z","etag":null,"topics":["dom","dom-element","dom-utilities","hyperlink","javascript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/closest-link","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/AshikNesin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T07:53:34.000Z","updated_at":"2023-02-06T08:56:56.000Z","dependencies_parsed_at":"2022-09-16T15:10:24.314Z","dependency_job_id":null,"html_url":"https://github.com/AshikNesin/closest-link","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AshikNesin/closest-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshikNesin%2Fclosest-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshikNesin%2Fclosest-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshikNesin%2Fclosest-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshikNesin%2Fclosest-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AshikNesin","download_url":"https://codeload.github.com/AshikNesin/closest-link/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshikNesin%2Fclosest-link/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263148730,"owners_count":23421240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dom","dom-element","dom-utilities","hyperlink","javascript"],"created_at":"2024-11-12T06:27:25.155Z","updated_at":"2025-07-02T13:35:54.161Z","avatar_url":"https://github.com/AshikNesin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Find closest hyperlink in DOM element\n\n## Install\n\n```\n$ npm install --save closest-link\n```\n\n## Usage\n\n```html\n\u003carticle\u003e\n  \u003ca href=\"https://ashiknesin.com\"\u003eHere is link\n    \u003cspan id=\"outer-span\"\u003eHere is outer-span\n      \u003cspan id=\"inner-span\"\u003eHere is inner-span\u003c/span\u003e\n    \u003c/span\u003e\n  \u003c/a\u003e\n\u003c/article\u003e\n```\n\n```js\nconst closestLink = require('closest-link');\nconst targetElement = document.querySelector('#inner-span')\nclosestLink(targetElement);\n//=\u003e '\u003ca href=\"https://ashiknesin.com\"\u003e...\u003c/a\u003e'\n```\n\n## License\n\nMIT © [Ashik Nesin](https://ashiknesin.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiknesin%2Fclosest-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashiknesin%2Fclosest-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiknesin%2Fclosest-link/lists"}