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

iframer

v1.0.0

Published

IFRAMEr makes your web components portable and your life easier

Downloads

3

Readme

IFRAMEr makes your components portable and your life easier.

If you look for a simple approach which helps creating reusable web components - IFRAMEr might be exactly what you need. This is a small JavaScript function that wraps your html markup with all styles and scripts you need for its work - into dynamically created iframe element, so page can't suddenly break the original design of your component.

Overview

Enjoy with the demo on JsFiddle first: https://jsfiddle.net/vmysla/7rhgoeuq/3/embedded/result/

IFRAMEr solved my problem

Demo: https://jsfiddle.net/vmysla/7rhgoeuq/3/embedded/result/

IFRAMEr has no dependencies. Total size for minified version of the script is 495 bytes gzipped (798 bytes uncompressed). You can extend and customize it by adding own tasks.

Feel free to fork: git clone https://github.com/vmysla/IFRAMEr

Get started

Widget is any web component which is wrapped into IFRAME for its wide distribution in the web. You can create widgets from any frontend element you have on the page:

    ...
	<h1>This is a page</h1>
	...
	<!-- Let's say, this is the part of your page which you want to reuse on different sites: --> 
	<style> 
		b { color : red; } 
	</style>
	<div>
    	Hi! <br/> I'm simple <b id="term">html element</b>!
    </div>
    <script type="widget/javascript">
	    document.getElementById('term').innerHTML = 'web component';
	</script>
	...

It has own HTML markup, CSS styles and JavaScript code as well. To make a widget - you have to put all those things into script tags with special type attributes:

####1. Wrap your HTML code with the script[type=widget/html] tag

	<script type="widget/html">
		<style> 
			b { color : red; } 
		</style>
		<div>
	    	Hi! <br/> I'm simple <b id="term">web component</b>!
	    </div>
	</script>

####2. Put your JavaScript code for widget into script[widget/javascript], right after 1.

	<script type="widget/javascript">
	    document.getElementById('term').innerHTML = 'iframe widget';
	</script>

####3. Add IFRAMEr script just before closing body tag

     ...
     <script src="//rawgit.com/vmysla/IFRAMEr/master/dist/iframer.min.js"></script>
  </body>

Because all your markup and code are placed into own script tags - browser wouldn't render nor execute them. In another hand, IFRAMEr is looking for such tags on your pages and replaces them with IFRAMEs it generates on fly.

Supported browsers

Currently it supports IE6+, FF3.5+, and rest of the modern browsers for Linux, Windows and Mac.

Google Analytics

As a bonus IFRAMEr automatically provides Universal Google Analytics Web Tracker (ga function) from the page into widget's IFRAME.

License

MIT.