Comparing version 0.4.3 to 0.4.4
function log() { | ||
console.log(arguments) | ||
} | ||
function printjson() { | ||
@@ -12,3 +8,4 @@ var arg = arguments[0] || arguments[1] | ||
var http = { | ||
req: function(method,url,data,win,fail) { | ||
req: function(method,url,data,cb) { | ||
cb = cb || printjson | ||
$.ajax({ | ||
@@ -23,4 +20,4 @@ url: url, | ||
success: win || log, | ||
error: fail || win || log | ||
success: function(out){cb(null,out)}, | ||
error: function(out){cb(out)} | ||
}) | ||
@@ -30,17 +27,17 @@ }, | ||
post: function(url,data,win,fail) { | ||
http.req('POST',url,data,win,fail) | ||
post: function(url,data,cb) { | ||
http.req('POST',url,data,cb) | ||
}, | ||
put: function(url,data,win,fail) { | ||
http.req('PUT',url,data,win,fail) | ||
put: function(url,data,cb) { | ||
http.req('PUT',url,data,cb) | ||
}, | ||
get: function(url,win,fail) { | ||
http.req('GET',url,null,win,fail) | ||
get: function(url,cb) { | ||
http.req('GET',url,null,cb) | ||
}, | ||
del: function(url,win,fail) { | ||
http.req('DELETE',url,null,win,fail) | ||
del: function(url,cb) { | ||
http.req('DELETE',url,null,cb) | ||
} | ||
} |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["minimum","viable","product","toolkit","startup","lean"], | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "homepage": "https://senecajs.org", |
@@ -16,3 +16,3 @@ # seneca - Node.js module | ||
Current Version: 0.4.3 | ||
Current Version: 0.4.4 | ||
@@ -19,0 +19,0 @@ Tested on: node 0.8.16 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156078
35
4188