Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

corslite

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corslite - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

.idea/.name

17

corslite.js

@@ -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?

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc