
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
A microscopic, RESTful, AJAX browser library; just under 2kb.
Installation:
var request = new Ax( Object || Arguments);
var request = new Ax(method, url, [data], [type], done);
Similar approach, see arguments above for explanation of values...
var request = new Ax({
method: method,
url: url,
data: [data],
type: [type],
done: done
}, [done]);
NOTE: the done callback can either be in the first argument that is an object, or the last argument; but not both. If a function is detected as the last argument, Ax will use that and ignore the other.
The done callback function is passed as the last argument.
var request = new Ax(...args, function (res, xhr, err) {
// Single error detection
if (err) {
// Whoops lets do something
}
console.log('response is', res);
});
It may also be part of the options object
var request = new Ax({
...options,
done: function (res, xhr, err) {
if (err) console.error(err);
console.log(res, xhr);
}
});
Get user data...
var request = new Ax('GET', '/users/' + userid', function (res, xhr, err) {
if (err) {
// An error has occurred
} else {
var userdata = res;
// Do something with user data.
}
});
Update a user profile...
var request = new Ax({
method: 'PUT',
url: userUrl,
data: newData,,
done: callBack()
});
Post a form...
var request = new Ax('POST', '/submit/', formData, function (res, xhr, err) {
if (err) {
alert ('total failure', err);
} else {
console.log('server response is', res);
}
});
<script src="ax.min"></script>
Ax.js has been built with browserify, and works with both browserify and webpack.
Install via npm:
npm install axjs
require the module
var Ax = require('axjs');
Ax.js can be required in with a UMD or AMD library like requirejs.
var Ax = require('ax');
FAQs
A microscopic, RESTful, AJAX browser library; just under 2kb.
The npm package axjs receives a total of 1 weekly downloads. As such, axjs popularity was classified as not popular.
We found that axjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.