This commit is contained in:
hatuhn
2019-09-13 09:45:04 +07:00
parent f14a34ba19
commit 558fb07261
16790 changed files with 0 additions and 1642370 deletions

View File

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

View File

@@ -1,13 +0,0 @@
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

View File

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

View File

@@ -1,64 +0,0 @@
# 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

View File

@@ -1,13 +0,0 @@
{
"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
View File

@@ -1,23 +0,0 @@
/**
* 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)));
}
};

View File

@@ -1,52 +0,0 @@
{
"_from": "component-bind@1.0.0",
"_id": "component-bind@1.0.0",
"_inBundle": false,
"_integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
"_location": "/component-bind",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "component-bind@1.0.0",
"name": "component-bind",
"escapedName": "component-bind",
"rawSpec": "1.0.0",
"saveSpec": null,
"fetchSpec": "1.0.0"
},
"_requiredBy": [
"/socket.io-client",
"/socket.io/socket.io-client"
],
"_resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
"_shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1",
"_spec": "component-bind@1.0.0",
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/t-latehome/wp-content/plugins/opal-estate-pro/node_modules/socket.io-client",
"bugs": {
"url": "https://github.com/component/bind/issues"
},
"bundleDependencies": false,
"component": {
"scripts": {
"bind/index.js": "index.js"
}
},
"deprecated": false,
"description": "function binding utility",
"devDependencies": {
"mocha": "*",
"should": "*"
},
"homepage": "https://github.com/component/bind#readme",
"keywords": [
"bind",
"utility"
],
"name": "component-bind",
"repository": {
"type": "git",
"url": "git+https://github.com/component/bind.git"
},
"version": "1.0.0"
}