Socket
Socket
Sign inDemoInstall

anchor-markdown-header

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor-markdown-header

Generates an anchor for a markdown header.


Version published
Weekly downloads
73K
decreased by-1.48%
Maintainers
1
Weekly downloads
 
Created
Source

anchor-markdown-header build status

Generates an anchor for a markdown header.

Example

var anchor = require('anchor-markdown-header');

anchor('"playerJoined" (player)'); 
// --> ["playerJoined" (player)](#playerjoined-player)

anchor('fs.rename(oldPath, newPath, [callback])', 'nodejs.org', 'fs') 
// --> [fs.rename(oldPath, newPath, [callback])](#fs_fs_rename_oldpath_newpath_callback)

// github.com mode is default
anchor('"playerJoined" (player)') === anchor('"playerJoined" (player)', 'github.com'); 
// --> true

API

anchor(header[, mode] [, moduleName])

/**
 * @param header      {String} The header to be anchored.
 * @param mode        {String} The anchor mode ('github.com'|'nodejs.org').
 * @param moduleName  {String} The name of the module of the given header (required only for 'nodejs.org' mode).
 * @return            {String} The header anchor that is compatible with the given mode.
  */

Keywords

FAQs

Package last updated on 31 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc