Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lockandload

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lockandload - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

index.html

4

main.js

@@ -1,2 +0,2 @@

(function(W, D) {
!function(W, D) {
"use strict";

@@ -6,2 +6,2 @@ define(function() {

});
})(window, document);
}(window, document);
{
"name": "lockandload",
"version": "1.0.0",
"version": "1.0.1",
"description": "Minimalist AMD-compliant Javascript and CSS loader",

@@ -8,3 +8,5 @@ "main": "index.html",

"scripts": {
"test": "# Can only be tested inside a browser environment."
"test": "# Can only be tested inside a browser environment.",
"prepublish":
"sed -e '/^[\t ]*\\/\\//d' -e '/^[\t ]*<!--/d' <annotated.html >index.html"
},

@@ -11,0 +13,0 @@ "dependencies": {},

<h1>lockandload</h1>
Lockandload is a minimal AMD-loader-compatible boilerplate to start
Lockandload is a minimal AMD-loader-compatible boilerplate to kickstart
your website/single-page-app.
Gzipped, the essential script content amounts to roughly 1KB of code.
Without compression it blows up to just under 2KB. Further minifying this
code does not result in any significant gains, it would just hinder
readability.
## Features
- Less filling: 1KB of gzipped script content.
- Handminified to retain readable and maintainable code.
- It's so small, it can and should be inlined on your HTML page
(which is also one of the reasons to handminify it only).
- Fully asynchronous script loader: AMD-compatible.
- Supports anonymous define() calls.
- Supports local require() calls (with one and two arguments).
- Supports implicit and explicit ['require'] dependencies.
- Does not support implicit nor explicit exports/module dependencies.
- Circular dependencies will silently hang in unresolved state.
- No extra diagnostic code to minimise code weight and optimise loading speed.
- Fully event driven, no polling timers.
- Standard events: domready and headready.
- Both high and low priority asynchronous loading of Javascript and CSS files.
- Leverages native browser speed for high priority loading (by getting out
of the way).
- Legacy support for $(...) jquery riddled synchronous code.
- Legacy support for loading synchronous Javascript.
- Single-page-app support using $$(...) page refresh callbacks.
- Supports IE10 and up and all other webbrowsers.
- No config file, means: no syntax to learn, no config file parser code.
## Requirements
It runs inside any webbrowser environment (starting at IE11 and up).
It runs inside any webbrowser environment (starting at IE10 and up).
## Usage
### API
Copy `index.html`, `main.js` and `css/main.css` boilerplate
files to your own new website, and start adjusting them to taste.
## API
## References

@@ -18,1 +50,10 @@

(AMD)](https://github.com/amdjs/amdjs-api/blob/master/AMD.md).
- Inspired by [Curiosity-Driven's minimal
loader](https://curiosity-driven.org/minimal-loader):
reducing the featureset of lockandload to that what that loader supports,
we end up with 320 bytes for reduced-lockandload and 386 bytes for
that loader.
Other loaders:
- [RequireJS](https://requirejs.org/).
- [curl](https://github.com/cujojs/curl).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc