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 0.1.8 to 0.1.10

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": "0.1.8",
"version": "0.1.10",
"description": "Minimalist AMD-compliant Javascript and CSS loader",

@@ -9,3 +9,4 @@ "main": "index.html",

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

@@ -12,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
## API

@@ -19,6 +48,9 @@ ## References

- Inspired by [Curiosity-Driven's minimal
loader](https://curiosity-driven.org/minimal-loader).
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/unscriptable/curl).
- [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