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

noin

v0.0.5

Published

Takes inline scripts and puts them into a separate file

Readme

Noin

Command line utility that moves all the inline scripts in an .html file and put them into their own .js files. It then replaces the inline scripts with script tags linking to the newly created .js files. It also goes through and removes all inline event listeners and moves them into their own file.

Installation

To install, just run:

npm install -g noin

Usage

To use noin on an individual file simply run:

noin index.html

To use noin on an entire folder add the -r flag:

noin -r directory

To have noin backup the files it processes use add the -b flag:

noin -b index.html

Example

Noin will take in an HTML file:

index.html

<html>
<head>
  <script>
  console.log('This inline script is in the header');
  </script>
</head>
<body>
  <p onClick="console.log('This is an inline event');">p Element</p>
  <div onClick='console.log("Different quotation marks");'>div Element</div>
  <div onClick="alert('This div has already has an ID');" id="named">Another div ELement</div>
  <p onclick="alert('Testing lowercase onclick');">Another p Element</p>
  <script>
  console.log("This inline script is in the footer");
  </script>
</body>
</html>

It backs up the file (index.html.old), then it generates individual .js files for each inline script and inline event listener

index_script0.js

console.log('This inline script is in the header');

index_script1.js

console.log('This inline script is in the footer');

index_events.js

var listener_0 = document.getElementById("listener_0");
listener_0.addEventListener("click", function() {console.log('This is an inline event');}, false);
var listener_1 = document.getElementById("listener_1");
listener_1.addEventListener("click", function() {console.log("Different quotation marks");}, false);
var named = document.getElementById("named");
named.addEventListener("click", function() {alert('This div has already has an ID');}, false);
var listener_2 = document.getElementById("listener_2");
listener_2.addEventListener("click", function() {alert('Testing lowercase onclick');}, false);

And rips out all the inline script and inline events and links them properly to the .js file (it will add id's to elements that have inline events but no id).

index.html

<html>
<head>
  <script src="index_script0.js"></script>
</head>
<body>
  <p id="listener_0">p Element</p>
  <div id="listener_1">div Element</div>
  <div id="named">Another div ELement</div>
  <p id="listener_2">Another p Element</p>
  <script src="index_script1.js"></script>
  <script src="index_events.js"></script>
</body>
</html>

Notice

Put together for csp testing purposes. It's pretty simple code, but was thrown together quickly and not thourougly tested. Use at your own risk.