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

4
node_modules/component-bind/.npmignore generated vendored Normal file
View File

@ -0,0 +1,4 @@
support
test
examples
*.sock

13
node_modules/component-bind/History.md generated vendored Normal file
View File

@ -0,0 +1,13 @@
1.0.0 / 2014-05-27
==================
* index: use slice ref (#7, @viatropos)
* package: rename package to "component-bind"
* package: add "repository" field (#6, @repoify)
* package: add "component" section
0.0.1 / 2010-01-03
==================
* Initial release

7
node_modules/component-bind/Makefile generated vendored Normal file
View File

@ -0,0 +1,7 @@
test:
@./node_modules/.bin/mocha \
--require should \
--reporter spec
.PHONY: test

64
node_modules/component-bind/Readme.md generated vendored Normal file
View File

@ -0,0 +1,64 @@
# bind
Function binding utility.
## Installation
```
$ component install component/bind
```
## API
- [bind(obj, fn)](#bindobj-fn)
- [bind(obj, fn, ...)](#bindobj-fn-)
- [bind(obj, name)](#bindobj-name)
<a name=""></a>
<a name="bindobj-fn"></a>
### bind(obj, fn)
should bind the function to the given object.
```js
var tobi = { name: 'tobi' };
function name() {
return this.name;
}
var fn = bind(tobi, name);
fn().should.equal('tobi');
```
<a name="bindobj-fn-"></a>
### bind(obj, fn, ...)
should curry the remaining arguments.
```js
function add(a, b) {
return a + b;
}
bind(null, add)(1, 2).should.equal(3);
bind(null, add, 1)(2).should.equal(3);
bind(null, add, 1, 2)().should.equal(3);
```
<a name="bindobj-name"></a>
### bind(obj, name)
should bind the method of the given name.
```js
var tobi = { name: 'tobi' };
tobi.getName = function() {
return this.name;
};
var fn = bind(tobi, 'getName');
fn().should.equal('tobi');
```
## License
MIT

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

@ -0,0 +1,13 @@
{
"name": "bind",
"version": "1.0.0",
"description": "function binding utility",
"keywords": [
"bind",
"utility"
],
"dependencies": {},
"scripts": [
"index.js"
]
}

23
node_modules/component-bind/index.js generated vendored Normal file
View File

@ -0,0 +1,23 @@
/**
* Slice reference.
*/
var slice = [].slice;
/**
* Bind `obj` to `fn`.
*
* @param {Object} obj
* @param {Function|String} fn or string
* @return {Function}
* @api public
*/
module.exports = function(obj, fn){
if ('string' == typeof fn) fn = obj[fn];
if ('function' != typeof fn) throw new Error('bind() requires a function');
var args = slice.call(arguments, 2);
return function(){
return fn.apply(obj, args.concat(slice.call(arguments)));
}
};

22
node_modules/component-bind/package.json generated vendored Normal file
View File

@ -0,0 +1,22 @@
{
"name": "component-bind",
"version": "1.0.0",
"description": "function binding utility",
"keywords": [
"bind",
"utility"
],
"devDependencies": {
"mocha": "*",
"should": "*"
},
"component": {
"scripts": {
"bind/index.js": "index.js"
}
},
"repository": {
"type": "git",
"url": "https://github.com/component/bind.git"
}
}