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

jpload

v1.6.4

Published

Small template engine to build reliable single page website applications.

Readme

JPLoad is a small library that allows you to develop fast an reliable single page website applications.

Introduction

Currently there are many libraries/frameworks to help web developers to build single page applications. The majority of these frameworks required advanced knowledge of JavaScript and deep systems configurations. JPLoad has been created to help web developers to build single web application without having a deep understanding of Javascript.

Getting Started

To see how to use JPLoad to build a single web application, check out this example.

What's Included

JPLoad does not attempt to be a full, batteries-included framework. Instead, it tries to simplify the development by allowing the developer to use the library in the most appropiate way for their application.

Including the library into your main html file (Usually index.html)

<html>
<head></head>
<body>
 <div id="app"></div>
...
<script src="js/JPLoad.min.js"></script>
</body>
</html>

Declaring the hook

You need to declare a root element. The entire application will be created inside this element.

Javascript

var hook = document.getElementById('app');
...
if (response) {
	hook.innerHTML = response;
}

jQuery

var hook = $('#app');
...
if (response) {
	hook.html(response);
}

Requesting the template file

Template are html files that are injected into our application via Ajax.

JPLoad.getView('templates/init.html', function (response) {
	if (response) {}  //The template data resides in the response variable.
});

Injecting the template file

Template data can be injected into the element with the id 'div-id'

JPLoad.loadView(response, 'div-id');

Asynchronous request of templates

Templates will be loaded as their call finished.

JPLoad.getView('templates/second.html', function (response) {
	JPLoad.loadView(response, 'second-div');
});

JPLoad.getView('templates/first.html', function (response) {
	JPLoad.loadView(response, 'first-div');
});

Synchronous request of templates

Templates nested are loaded after the parent.

JPLoad.getView('templates/first.html', function (response) {
	JPLoad.loadView(response, 'first-div');

	JPLoad.getView('templates/second.html', function (response) {
		JPLoad.loadView(response, 'second-div');
	});
});

Injecting data into our template files

JPLoad has support to inject data into our templates before they are being loaded into our application.

####template.html ####

<html>
	<title><b>{{title}}</b></title>
	<body>
		<a href="#"><b>{{link-description}}</b></a>
	</body>
</html>

scripts.js

plain javascript

var data = {'title': 'Injecting Data', 'link-description': 'JPLoad Link'}
JPLoad.getView('templates/template.html', function (response) {
	JPLoad.loadView(response, 'id-div', data);
});

jQuery

var data = {'title': 'Injecting Data', 'link-description': 'JPLoad Link'}
JPLoad.getView('templates/template.html', function (response) {
	JPLoad.loadView(response, $('id-div'), data);
});

####HTML after injecting data ####

<html>
	<title><b>Injecting Data</b></title>
	<body>
		<a href="#"><b>JPLoad Link</b></a>
	</body>
</html>

License

MIT