aboutsummaryrefslogtreecommitdiffhomepage
path: root/node_modules/has-cors
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/has-cors')
-rw-r--r--node_modules/has-cors/.npmignore3
-rw-r--r--node_modules/has-cors/History.md21
-rw-r--r--node_modules/has-cors/Makefile11
-rw-r--r--node_modules/has-cors/Readme.md24
-rw-r--r--node_modules/has-cors/component.json13
-rw-r--r--node_modules/has-cors/index.js17
-rw-r--r--node_modules/has-cors/package.json97
-rw-r--r--node_modules/has-cors/test.js24
8 files changed, 210 insertions, 0 deletions
diff --git a/node_modules/has-cors/.npmignore b/node_modules/has-cors/.npmignore
new file mode 100644
index 0000000..665aa21
--- /dev/null
+++ b/node_modules/has-cors/.npmignore
@@ -0,0 +1,3 @@
+components
+build
+node_modules
diff --git a/node_modules/has-cors/History.md b/node_modules/has-cors/History.md
new file mode 100644
index 0000000..4308161
--- /dev/null
+++ b/node_modules/has-cors/History.md
@@ -0,0 +1,21 @@
+
+1.1.0 / 2014-11-12
+==================
+
+ * remove "global" module dependency (#2, @achingbrain)
+
+1.0.2 / 2013-08-27
+==================
+
+ * explicitly use `global` instead of being implicit
+ * pin "component/global" to v2.0.1
+
+1.0.1 / 2013-08-23
+==================
+
+ * package: add "component" section
+
+1.0.0 / 2013-08-22
+==================
+
+ * Initial release
diff --git a/node_modules/has-cors/Makefile b/node_modules/has-cors/Makefile
new file mode 100644
index 0000000..0f14dac
--- /dev/null
+++ b/node_modules/has-cors/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build --dev
+
+components: component.json
+ @component install --dev
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/node_modules/has-cors/Readme.md b/node_modules/has-cors/Readme.md
new file mode 100644
index 0000000..8954646
--- /dev/null
+++ b/node_modules/has-cors/Readme.md
@@ -0,0 +1,24 @@
+
+# has-cors
+
+ Detects support for Cross-Origin Resource Sharing
+
+## Installation
+
+ Install with [component(1)](http://component.io):
+
+ $ component install component/has-cors
+
+## API
+
+Exports `true` if the user-agent supports CORS, or `false` otherwise.
+
+``` js
+var hasCORS = require('has-cors');
+console.log(hasCORS);
+// true
+```
+
+## License
+
+ MIT
diff --git a/node_modules/has-cors/component.json b/node_modules/has-cors/component.json
new file mode 100644
index 0000000..b95e04d
--- /dev/null
+++ b/node_modules/has-cors/component.json
@@ -0,0 +1,13 @@
+{
+ "name": "has-cors",
+ "repo": "component/has-cors",
+ "description": "Detects support for Cross-Origin Resource Sharing",
+ "version": "1.1.0",
+ "keywords": [],
+ "development": {},
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/node_modules/has-cors/index.js b/node_modules/has-cors/index.js
new file mode 100644
index 0000000..952a7c8
--- /dev/null
+++ b/node_modules/has-cors/index.js
@@ -0,0 +1,17 @@
+
+/**
+ * Module exports.
+ *
+ * Logic borrowed from Modernizr:
+ *
+ * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
+ */
+
+try {
+ module.exports = typeof XMLHttpRequest !== 'undefined' &&
+ 'withCredentials' in new XMLHttpRequest();
+} catch (err) {
+ // if XMLHttp support is disabled in IE then it will throw
+ // when trying to create
+ module.exports = false;
+}
diff --git a/node_modules/has-cors/package.json b/node_modules/has-cors/package.json
new file mode 100644
index 0000000..b868fc7
--- /dev/null
+++ b/node_modules/has-cors/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "has-cors@1.1.0",
+ "scope": null,
+ "escapedName": "has-cors",
+ "name": "has-cors",
+ "rawSpec": "1.1.0",
+ "spec": "1.1.0",
+ "type": "version"
+ },
+ "/mnt/e/Yaroslav/Documents/Webs/nodejs/checkers/node_modules/socket.io-client"
+ ]
+ ],
+ "_from": "has-cors@1.1.0",
+ "_id": "has-cors@1.1.0",
+ "_inCache": true,
+ "_location": "/has-cors",
+ "_npmUser": {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "_npmVersion": "1.4.23",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "has-cors@1.1.0",
+ "scope": null,
+ "escapedName": "has-cors",
+ "name": "has-cors",
+ "rawSpec": "1.1.0",
+ "spec": "1.1.0",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/engine.io-client",
+ "/socket.io-client"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
+ "_shasum": "5e474793f7ea9843d1bb99c23eef49ff126fff39",
+ "_shrinkwrap": null,
+ "_spec": "has-cors@1.1.0",
+ "_where": "/mnt/e/Yaroslav/Documents/Webs/nodejs/checkers/node_modules/socket.io-client",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/component/has-cors/issues"
+ },
+ "component": {
+ "scripts": {
+ "has-cors/index.js": "index.js"
+ }
+ },
+ "dependencies": {},
+ "description": "Detects support for Cross-Origin Resource Sharing",
+ "devDependencies": {
+ "chai": "^1.10",
+ "mocha": "^2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "5e474793f7ea9843d1bb99c23eef49ff126fff39",
+ "tarball": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz"
+ },
+ "gitHead": "27e9b96726b669e9594350585cc1e97474d3f995",
+ "homepage": "https://github.com/component/has-cors",
+ "keywords": [
+ "cors",
+ "cross",
+ "origin",
+ "resource",
+ "sharing",
+ "domain"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "shtylman",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "name": "has-cors",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/component/has-cors.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.1.0"
+}
diff --git a/node_modules/has-cors/test.js b/node_modules/has-cors/test.js
new file mode 100644
index 0000000..d2dfb84
--- /dev/null
+++ b/node_modules/has-cors/test.js
@@ -0,0 +1,24 @@
+var expect = require('chai').expect;
+
+describe('has-cors', function() {
+ beforeEach(function() {
+ // make sure result is not cached
+ delete require.cache[require.resolve('./')];
+ });
+
+ it('should not have cors', function() {
+ var hasCors = require('./');
+
+ expect(hasCors).to.be.false;
+ });
+
+ it('should have cors', function() {
+ global.XMLHttpRequest = function() {
+ this.withCredentials = true;
+ };
+
+ var hasCors = require('./');
+
+ expect(hasCors).to.be.true;
+ });
+});