Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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).
- Host: GitHub
- URL: https://github.com/3dtech/logistics.js
- Owner: 3dtech
- Created: 2014-10-23T08:49:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-17T16:37:31.000Z (over 9 years ago)
- Last Synced: 2023-02-27T01:11:54.276Z (over 1 year ago)
- Language: JavaScript
- Size: 164 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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, getTextCalled 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"];
}
);
```