mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-10-31 06:08:33 +00:00 
			
		
		
		
	update
This commit is contained in:
		
							
								
								
									
										4
									
								
								node_modules/component-bind/.npmignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								node_modules/component-bind/.npmignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| support | ||||
| test | ||||
| examples | ||||
| *.sock | ||||
							
								
								
									
										13
									
								
								node_modules/component-bind/History.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								node_modules/component-bind/History.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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
									
								
							
							
						
						
									
										7
									
								
								node_modules/component-bind/Makefile
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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
									
								
							
							
						
						
									
										64
									
								
								node_modules/component-bind/Readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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
									
								
							
							
						
						
									
										13
									
								
								node_modules/component-bind/component.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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
									
								
							
							
						
						
									
										23
									
								
								node_modules/component-bind/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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))); | ||||
|   } | ||||
| }; | ||||
							
								
								
									
										55
									
								
								node_modules/component-bind/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								node_modules/component-bind/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| { | ||||
|   "_args": [ | ||||
|     [ | ||||
|       "component-bind@1.0.0", | ||||
|       "/Users/tatiana/selfdefined" | ||||
|     ] | ||||
|   ], | ||||
|   "_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", | ||||
|   "_spec": "1.0.0", | ||||
|   "_where": "/Users/tatiana/selfdefined", | ||||
|   "bugs": { | ||||
|     "url": "https://github.com/component/bind/issues" | ||||
|   }, | ||||
|   "component": { | ||||
|     "scripts": { | ||||
|       "bind/index.js": "index.js" | ||||
|     } | ||||
|   }, | ||||
|   "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" | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 tatianamac
					tatianamac