Comparing version 0.0.5 to 0.0.6
@@ -1,2 +0,2 @@ | ||
function xhr(url, callback, cors) { | ||
function corslite(url, callback, cors) { | ||
var sent = false; | ||
@@ -14,3 +14,3 @@ | ||
var x; | ||
var x = new window.XMLHttpRequest(); | ||
@@ -21,9 +21,4 @@ function isSuccessful(status) { | ||
if (cors && ( | ||
// IE7-9 Quirks & Compatibility | ||
typeof window.XDomainRequest === 'object' || | ||
// IE9 Standards mode | ||
typeof window.XDomainRequest === 'function' | ||
)) { | ||
// IE8-10 | ||
if (cors && !('withCredentials' in x)) { | ||
// IE8-9 | ||
x = new window.XDomainRequest(); | ||
@@ -45,4 +40,2 @@ | ||
} | ||
} else { | ||
x = new window.XMLHttpRequest(); | ||
} | ||
@@ -103,2 +96,2 @@ | ||
if (typeof module !== 'undefined') module.exports = xhr; | ||
if (typeof module !== 'undefined') module.exports = corslite; |
{ | ||
"name": "corslite", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "xhr for browsers and ie", | ||
"main": "corslite.js", | ||
"directories": { | ||
"doc": "docs", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
"test": "testling" | ||
}, | ||
"devDependencies": { | ||
"tape": "~0.3.3", | ||
"tap": "~0.4.0", | ||
"browserify": "~2.12.0" | ||
"testling": "^1.6.1" | ||
}, | ||
"testling": { | ||
"browsers": { | ||
"ie": [ | ||
7, | ||
8, | ||
9, | ||
10 | ||
], | ||
"ff": [ | ||
3.5, | ||
10, | ||
15, | ||
16, | ||
17, | ||
18, | ||
19, | ||
20 | ||
], | ||
"chrome": [ | ||
10, | ||
22, | ||
25, | ||
26, | ||
27 | ||
], | ||
"safari": [ | ||
5.1, | ||
6 | ||
], | ||
"opera": [ | ||
12 | ||
] | ||
}, | ||
"files": "test/*.js" | ||
"browsers": [ | ||
"ie/7..latest", | ||
"firefox/3.5", | ||
"firefox/latest", | ||
"chrome/latest", | ||
"safari/5.1", | ||
"safari/6", | ||
"opera/12" | ||
], | ||
"files": "test.js", | ||
"server": "server.js" | ||
}, | ||
@@ -59,4 +32,3 @@ "repository": { | ||
"license": "BSD", | ||
"readmeFilename": "README.md", | ||
"gitHead": "f2178bb0990b9208a18d1671f3b387018279715a" | ||
"readmeFilename": "README.md" | ||
} |
@@ -8,3 +8,3 @@ ![a floating can of corslite](https://f.cloud.github.com/assets/83384/341733/2fc1dcb8-9d7a-11e2-8ad1-7961248920c3.png) | ||
```js | ||
xhr('http://b.tiles.mapbox.com/v3/tmcw.dem.json', function(err, resp) { | ||
corslite('http://b.tiles.mapbox.com/v3/tmcw.dem.json', function(err, resp) { | ||
// resp is the XMLHttpRequest object | ||
@@ -11,0 +11,0 @@ }, true); // cross origin? |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
2
14
1
25696
107
2