Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/3dtech/logistics.js

A JavaScript data loading library. No decencies. Small size. Support for: CORS , multiple resource loading, progress indicator, localStorage caching (JSON, XML, text, html, binary, images).
https://github.com/3dtech/logistics.js

Last synced: 8 days ago
JSON representation

A JavaScript data loading library. No decencies. Small size. Support for: CORS , multiple resource loading, progress indicator, localStorage caching (JSON, XML, text, html, binary, images).

Awesome Lists containing this project

README

        

Logistics.js
============

A JavaScript data loading library. No depencies. Small size. Support for: CORS, multiple resource loading, progress indicator, localStorage caching (JSON, XML, text, html, binary, images).

Usage
-----

Get a single resource

```javascript
Logistics.getJSON("http://example.com/file.json").success(function(result, dt){

});
```
There are also other shorthand methods: getImage, getBinary, getXML, getText

Called when all queued items are loaded. There is a 5ms delay for checking the finished state.
```javascript
Logistics.onFinishedLoading(function(){

});
```

Event for loading progress
```javascript
Logistics.onProgress(function(percentage){

});
```

Load multiple resources at calls after all are loaded
```javascript
Logistics.getMultiple(
{
"foo": {"url": "http://example.com/file.json", "type": "json"},
"bar": {"url": "http://example.com/file.jpeg", "type": "image"}
},
function(data){
var foo = data["foo"];
}
);
```