{"id":22871513,"url":"https://github.com/opensly/anchored","last_synced_at":"2025-03-31T11:41:03.426Z","repository":{"id":261730941,"uuid":"885160445","full_name":"opensly/anchored","owner":"opensly","description":"Transform plain URLs into clickable links for a seamless user experience.","archived":false,"fork":false,"pushed_at":"2024-11-09T02:44:01.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-06T17:11:39.551Z","etag":null,"topics":[],"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/opensly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"custom":["https://www.paypal.com/paypalme/LakshmikanthV"]}},"created_at":"2024-11-08T04:16:54.000Z","updated_at":"2024-11-09T02:44:26.000Z","dependencies_parsed_at":"2024-11-09T13:47:05.028Z","dependency_job_id":null,"html_url":"https://github.com/opensly/anchored","commit_stats":null,"previous_names":["opensly/anchored"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fanchored","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fanchored/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fanchored/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensly%2Fanchored/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensly","download_url":"https://codeload.github.com/opensly/anchored/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465216,"owners_count":20781914,"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":[],"created_at":"2024-12-13T13:19:35.859Z","updated_at":"2025-03-31T11:41:03.390Z","avatar_url":"https://github.com/opensly.png","language":"JavaScript","funding_links":["https://www.paypal.com/paypalme/LakshmikanthV","https://www.paypal.me/LakshmikanthV"],"categories":[],"sub_categories":[],"readme":"# Anchored.js\nAnchored.js is a lightweight JavaScript library for transforming plain URLs in text into clickable links. The function uses a regex-based approach to identify URLs, creating a DocumentFragment containing both links and plain text, suitable for DOM manipulation.\n\n## Features\n- Transforms plain URLs (e.g., https://example.com) into clickable links.\n- Supports common URL formats (http://, https://, www, etc.).\n- Can be used in various environments: browser, ES6 modules, and Node.js.\n\n## Usage Guide\n\n### In a browser (Global Script)\nInclude the `anchored.js` script in an HTML file:\n\n```\n\u003cscript src=\"path/to/anchored.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const text = \"Check this out: https://example.com and also http://test.com.\";\n  const result = anchored(text);\n  document.body.appendChild(result);\n\u003c/script\u003e\n```\n\n### In a Module (ES6/JavaScript Module)\n\n```\nimport anchored from './path/to/anchored.js';\n\nconst text = \"Visit https://example.com and http://test.com!\";\nconst result = anchored(text);\ndocument.body.appendChild(result);\n```\n\n### In a Node.js (CommonJS Module)\n\n```\nconst anchored = require('./path/to/anchored.js');\n\nconst text = \"Find more at https://example.com!\";\nconst result = anchored(text);\ndocument.body.appendChild(result);\n```\n\n### In a Webpack or Babel Environment (ES6 Module)\nAfter installing the module using Webpack/Babel:\n\n```\nimport anchored from './path/to/anchored.js';\n\nconst text = \"Here is https://example.com, check it out!\";\nconst result = anchored(text);\ndocument.getElementById(\"content\").appendChild(result);\n```\n\n## Support\nYour support inspires \u0026 encourage us more. If you are interested to make a donation to us, please click the below PayPal button.\n\n[![PayPal.me](https://img.shields.io/badge/paypal-donate-119fde.svg)](https://www.paypal.me/LakshmikanthV)\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fanchored","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensly%2Fanchored","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensly%2Fanchored/lists"}