A small JS Library for AJAX


0.1.33 years ago3 years agoMinified + gzip package size for @jojopr/miniajax in KB


miniAJAX JavaScript library

miniAJAX is a small JavaScript library for AJAX Request

How to use

AJAX.GET('url', {
    '200': function(data) {
        // Called on HTTP 200, data = XMLHttpRequest.ResponseText
    '404': function(data) {
        // Called on HTTP 404, data = XMLHttpRequest.ResponseText

The AJAX.GET(url, callbacks = {}) takes a url for the request and an object, holding callback functions, stored by key = HTTP Status Code and value = function(data)


npm i @jojopr/miniAJAX

<script src="node_modules/@jojopr/miniajax/dist/miniAJAX.min.js"></script>


  • Add Support for POST Requests

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.