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 🙏

© 2026 – Pkg Stats / Ryan Hefner

incite.js

v1.0.0

Published

Simple javascript lib for reference management and inline citation into HTML webpages.

Readme

incite.js

Simple javascript lib for reference management and inline citation into HTML webpages.

Inline Citation Demo

Getting Started

All you need to do is:

  1. Import the library
  2. Create a reference list
  3. Add your inline citations
  4. Style as you please
  1. Import the library:
import { CitationManager } from "./incite.js/src/CitationManager";
import { Citation } from "./incite.js/src/Citation";
  1. Create Reference List:
refMan = new CitationManager([
	new Citation("Spencer & Butler 2010", {
		name: "Spencer, C., & Butler, J. (2010). Survival after cardiac arrest and severe lactic acidosis (pH 6.61) due to haemorrhage. Emergency Medicine Journal, 27(10), 800-801.",
		url: "https://emj.bmj.com/content/27/10/800.long",
	}),
	new Citation("Stolmeijer 2018", {
		name: "Stolmeijer, R., Bouma, H. R., Zijlstra, J. G., Drost-de Klerck, A. M., Ter Maaten, J. C., & Ligtenberg, J. J. M. (2018). A systematic review of the effects of hyperoxia in acutely ill patients: should we aim for less?. BioMed research international, 2018.",
		url: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5977014/",
	}),
	new Citation("Wrenn 1990", {
		name: "Wrenn, K. (1990). The delta (Δ) gap: An approach to mixed acid-base disorders. Annals of emergency medicine, 19(11), 1310-1313.",
		url: "https://www.sciencedirect.com/science/article/pii/S0196064405822929",
	}),
]);
#This function searches for .incite and modifies the DOM to include the citations
refMan.augmentCitations();
  1. Add your inline citations
<div>
		Lorem ipsum dolor sit amet <div class="incite">[Wrenn 1990]</div>, consectetur adipiscing elit. 
		Etiam viverra ipsum ut mi facilisis vehicula vitae et ligula.<div class="incite">[Hamm 2015|Narins 1980]</div> 
		Nullam sagittis, velit congue posuere tincidunt, arcu tortor rutrum dolor, ut vulputate tortor risus id purus. 
<div>

Note: separate multiple citations with the "|" character.

  1. You can start off by modifying the following styles to fit your UI:
.incite {
	position: relative;
	display: inline;
}
.incite-popup {
	background-color: #555; 
	border-radius: 3px;
	min-width: 180px; 
	max-width: 240px;
	max-height: 180px; 
	font-size: 50%; 
	position: absolute; 
	bottom:	20px; 
	left: -240px; 
	padding: 8px;
	box-shadow: #222 3px 3px 3px;
}
.incite-popup:not(.incite-popup-show) {
	display: none;
}
.incite a{
	color: white;
	text-decoration: none;
	transition: 600ms;
}
.incite a:hover{
	/*color: #e7ea78;*/
	color: #f6aeae;
	text-decoration: underline;
}