npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@strdr4605/jump2header

v1.3.2

Published

Add "jump to" links for markdown headers

Downloads

3

Readme

jump2header#️⃣

Tests status Coverage Status PRs Welcome semantic-release

Add "jump to" links for markdown headers

Motivation

When README is too long and it takes to much time to scroll back it is better to have a link back to top

# awesome-project

...
Really long README
...

## Some section[⬆️](#awesome-project)

...

### Another section[⬆️](#awesome-project)

Installation

npm i -g @strdr4605/jump2header

Usage

jump2header # By default README.md file will be parsed and overwritten

API

jump2header --help
Options:
  --help                       Show help                                    [boolean]
  --version                    Show version number                          [boolean]
  --file, -f                   File to be parsed
                               Note: file shoud have .md extension

                                                      [string] [default: "README.md"]
  --output, -o                 File to write new content
                               Note: input file will be overwritten if not provided

                                                                             [string]
  --slug, -s, --header, -h     Specify header slug to jump to.
                               Note: use text after "#" in url.
                               https://github.com/<user>/<repo>#api -> api

                                                                             [string]
  --position, -p               Specify position of the link
                               "header" -> Link will be in header
                               "start" -> Link will be at the start of the section
                               "end" -> Link will be at the end of the section

                               Caution: may be some bugs with "end"

                              [choices: "header", "start", "end"] [default: "header"]
  --text, -t                   Specify text that will be used instead of emoji
                               Note: multiple words should be wrapped in quotes ""

                                                                             [string]
  --start                      Specify header from where to start adding links.
                               Notes:
                               multiple words should be wrapped in quotes ""
                               will much by RegExp

                                                                             [string]
  --end                        Specify header to where to end adding links.
                               Notes:
                               multiple words should be wrapped in quotes ""
                               will much by RegExp

                                                                             [string]
  --maxLevel, -l, --max-level  Specify maximal header level to insert links.
                               Note: value between 1 and 6

                                    [number] [choices: 1, 2, 3, 4, 5, 6] [default: 6]
  --emoji, -e                  Specify the emoji for the links.
                               1 -> ⬆
                               2 -> 🔝
                               3 -> 🔙
                               4 -> 🆙
                               5 -> 🔼

                                       [number] [choices: 1, 2, 3, 4, 5] [default: 1]
  --silent                     By default jump2header will add comment to created
                               links.
                               Use this flag if you don't want the comment

                                                                            [boolean]

Examples

TODO

This tool is in the early stages and is not fully covered with unit/e2e tests. So if you have time and know how to write tests for this tool please contribute with PRs or links on that may be helpful. See #18.

Development

npm i
npm run build:watch

In another tab

npm link
jump2header --help # or any other options
npm unlink # unlink after finishing work