Updated script that can be controled by Nodejs web app

This commit is contained in:
mac OS
2024-11-25 12:24:18 +07:00
parent c440eda1f4
commit 8b0ab2bd3a
8662 changed files with 1803808 additions and 34 deletions

3
node_modules/has-cors/.npmignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
components
build
node_modules

21
node_modules/has-cors/History.md generated vendored Normal file
View File

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

11
node_modules/has-cors/Makefile generated vendored Normal file
View File

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

24
node_modules/has-cors/Readme.md generated vendored Normal file
View File

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

13
node_modules/has-cors/component.json generated vendored Normal file
View File

@ -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"
]
}

17
node_modules/has-cors/index.js generated vendored Normal file
View File

@ -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;
}

32
node_modules/has-cors/package.json generated vendored Normal file
View File

@ -0,0 +1,32 @@
{
"name": "has-cors",
"version": "1.1.0",
"description": "Detects support for Cross-Origin Resource Sharing",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/component/has-cors.git"
},
"keywords": [
"cors",
"cross",
"origin",
"resource",
"sharing",
"domain"
],
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
"license": "MIT",
"component": {
"scripts": {
"has-cors/index.js": "index.js"
}
},
"devDependencies": {
"mocha": "^2.0",
"chai": "^1.10"
},
"scripts": {
"test": "mocha"
}
}

24
node_modules/has-cors/test.js generated vendored Normal file
View File

@ -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;
});
});