{"id":17402872,"url":"https://github.com/thlorenz/anchor-markdown-header","last_synced_at":"2025-04-09T08:11:32.955Z","repository":{"id":6824870,"uuid":"8073048","full_name":"thlorenz/anchor-markdown-header","owner":"thlorenz","description":"Generates an anchor for a markdown header.","archived":false,"fork":false,"pushed_at":"2023-03-22T00:15:54.000Z","size":229,"stargazers_count":28,"open_issues_count":6,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T05:09:48.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/thlorenz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-07T13:13:28.000Z","updated_at":"2025-02-11T15:47:21.000Z","dependencies_parsed_at":"2024-06-18T13:56:06.965Z","dependency_job_id":"5614a54a-63f4-40a4-8587-31433acf28a8","html_url":"https://github.com/thlorenz/anchor-markdown-header","commit_stats":{"total_commits":79,"total_committers":24,"mean_commits":"3.2916666666666665","dds":0.379746835443038,"last_synced_commit":"6b9bc1c902e48942666859fb6f795d91cbfd48e7"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fanchor-markdown-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fanchor-markdown-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fanchor-markdown-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fanchor-markdown-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thlorenz","download_url":"https://codeload.github.com/thlorenz/anchor-markdown-header/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999864,"owners_count":21031046,"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-10-16T18:34:00.108Z","updated_at":"2025-04-09T08:11:32.934Z","avatar_url":"https://github.com/thlorenz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anchor-markdown-header [![Node.js CI](https://github.com/thlorenz/anchor-markdown-header/actions/workflows/node.js.yml/badge.svg)](https://github.com/thlorenz/anchor-markdown-header/actions/workflows/node.js.yml)\n\nGenerates an anchor for a markdown header.\n\n## Example\n\n```js\nvar anchor = require('anchor-markdown-header');\n\nanchor('\"playerJoined\" (player)'); \n// --\u003e [\"playerJoined\" (player)](#playerjoined-player)\n\nanchor('fs.rename(oldPath, newPath, [callback])', 'nodejs.org', 'fs') \n// --\u003e [fs.rename(oldPath, newPath, [callback])](#fs_fs_rename_oldpath_newpath_callback)\n\n// github.com mode is default\nanchor('\"playerJoined\" (player)') === anchor('\"playerJoined\" (player)', 'github.com'); \n// --\u003e true\n```\n\n## API\n\n`anchor(header[, mode] [, moduleName] [, repetition)`\n\n```js\n/**\n * @name anchorMarkdownHeader\n * @function\n * @param header      {String} The header to be anchored.\n * @param mode        {String} The anchor mode (github.com|nodejs.org|bitbucket.org|ghost.org|gitlab.com).\n * @param repetition  {Number} The nth occurrence of this header text, starting with 0. Not required for the 0th instance.\n * @param moduleName  {String} The name of the module of the given header (required only for 'nodejs.org' mode).\n * @return            {String} The header anchor that is compatible with the given mode.\n */\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fanchor-markdown-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthlorenz%2Fanchor-markdown-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fanchor-markdown-header/lists"}