small javascript library
x_x.errand({
url: 'json-url',
json: true
}).success(function(result) {
console.log(result);
});
x_x.errand({
url: 'post-url',
method: 'post',
data: {
somedata: 'somevalue'
}
}).success(function(result) {
console.log(result);
}).error(function(message) {
console.log(message);
});
somedata = {postdata: 'postvalue'}
x_x.errand({
url: 'post-url',
method: 'post',
data: somedata,
headers : {
someheader: 'some header value'
}
}).success(function(result) {
console.log(result);
});
var req = x_x.errand('http://abc.com');
req.cancel()
x_x.extends({}, {someProperty: 'someValue'});
someVar = {};
x_x.isVarTypeOf(someVar, Object); //true
x_x.isVarTypeOf(someVar, Array); //false
x_x(window).on('ready', function(){ console.log('doc ready') });