Skip to content

Instantly share code, notes, and snippets.

@Fishrock123
Created October 27, 2015 15:30
Show Gist options
  • Save Fishrock123/cadd7cc9a42fcaa95635 to your computer and use it in GitHub Desktop.
Save Fishrock123/cadd7cc9a42fcaa95635 to your computer and use it in GitHub Desktop.
Searching 718 files for "bind(this)"
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\lib\config\core.js:
237 // Without prefix, nothing will ever work
238 mkdirp(this.prefix, cb)
239: }.bind(this))
240: }.bind(this))
241 }
242
...
282 }
283
284: then = then.bind(this)
285: done = done.bind(this)
286 this._saving ++
287
...
321
322 this.addString(data, file, 'ini', marker)
323: }.bind(this))
324 return this
325 }
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\lib\config\load-cafile.js:
6 if (!cafilePath) return process.nextTick(cb)
7
8: fs.readFile(cafilePath, 'utf8', afterCARead.bind(this))
9
10 function afterCARead (er, cadata) {
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\lib\config\load-prefix.js:
11 var g = this.get('global')
12 this[g ? 'globalPrefix' : 'localPrefix'] = prefix
13: }.bind(this),
14 get: function () {
15 var g = this.get('global')
16 return g ? this.globalPrefix : this.localPrefix
17: }.bind(this),
18 enumerable: true
19 })
..
22 { set: function (prefix) {
23 this.set('prefix', prefix)
24: }.bind(this),
25 get: function () {
26 return path.resolve(this.get('prefix'))
27: }.bind(this),
28 enumerable: true
29 })
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\ansi\lib\ansi.js:
141 stream.on('newline', function () {
142 this.newlines++
143: }.bind(this))
144 }
145 exports.Cursor = Cursor
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\combined-stream\lib\combined_stream.js:
45 pauseStream: this.pauseStreams,
46 });
47: stream.on('data', this._checkDataSize.bind(this));
48 stream = newStream;
49 }
..
85 var isStreamLike = CombinedStream.isStreamLike(stream);
86 if (isStreamLike) {
87: stream.on('data', this._checkDataSize.bind(this));
88 this._handleErrors(stream);
89 }
90
91 this._pipeNext(stream);
92: }.bind(this));
93 };
94
..
98 var isStreamLike = CombinedStream.isStreamLike(stream);
99 if (isStreamLike) {
100: stream.on('end', this._getNext.bind(this));
101 stream.pipe(this, {end: false});
102 return;
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\delayed-stream\lib\delayed_stream.js:
68 this._bufferedEvents.forEach(function(args) {
69 this.emit.apply(this, args);
70: }.bind(this));
71 this._bufferedEvents = [];
72 };
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\form-data\lib\form_data.js:
27 : options || {};
28
29: var append = CombinedStream.prototype.append.bind(this);
30
31 // all that streamy business can't handle numbers
..
200
201 next(footer);
202: }.bind(this);
203 };
204
...
349 request.on('response', cb.bind(this, null));
350 }
351: }.bind(this));
352
353 return request;
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\fstream\lib\abstract.js:
14 Abstract.prototype.on = function (ev, fn) {
15 if (ev === 'ready' && this.ready) {
16: process.nextTick(fn.bind(this))
17 } else {
18 Stream.prototype.on.call(this, ev, fn)
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\node-gyp\node_modules\tar\lib\entry.js:
29 this._queueLen = 0
30
31: this._read = this._read.bind(this)
32
33 this.props = {}
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\npm-registry-client\lib\deprecate.js:
39 }
40 this.request(uri, options, cb)
41: }.bind(this))
42 }
43
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\npm-registry-client\lib\request.js:
258 }
259 return cb(er, parsed, data, response)
260: }.bind(this)
261 }
262
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\npm-registry-client\lib\unpublish.js:
77 }
78 cb_(er)
79: }.bind(this))
80: }.bind(this))
81 }
82
..
95 var d = dist.bin[bt]
96 detach.call(this, uri, data, url.parse(d.tarball).pathname, null, credentials, cb)
97: }.bind(this)
98 }, this), cb)
99: }.bind(this))
100: }.bind(this))
101: }.bind(this)
102 }
103
...
112 if (!rev) return cb(new Error('No _rev found in ' + data._id))
113 detach.call(this, data, path, rev, cb)
114: }.bind(this))
115 }
116
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\readable-stream\lib\_stream_duplex.js:
80 // no more data can be written.
81 // But allow more writes to happen in this tick.
82: process.nextTick(this.end.bind(this));
83 }
84
C:\Documents and Settings\Jeremiah\My Documents\node\deps\npm\node_modules\tar\lib\entry.js:
30 this._queueLen = 0
31
32: this._read = this._read.bind(this)
33
34 this.props = {}
C:\Documents and Settings\Jeremiah\My Documents\node\deps\v8\test\promises-aplus\lib\mocha.js:
118 this.timer = setTimeout(function() {
119 suite.ReportError(this, Error('timeout'));
120: }.bind(this), TIMEOUT);
121
122 this.RunFunction(suite, this.before, function(e) {
...
155 }
156 %EnqueueMicrotask(postAction);
157: }.bind(this));
158: }.bind(this));
159: }.bind(this));
160 };
161
...
194 ++this.currentIndex;
195 %EnqueueMicrotask(Run);
196: }.bind(this));
197 };
198
C:\Documents and Settings\Jeremiah\My Documents\node\lib\_debugger.js:
160 });
161
162: protocol.onResponse = this._onResponse.bind(this);
163 }
164 inherits(Client, net.Stream);
...
734 input: this.stdin,
735 output: this.stdout,
736: eval: this.controlEval.bind(this),
737 useGlobal: false,
738 ignoreUndefined: true
...
765
766 // Handle all possible exits
767: process.on('exit', this.killChild.bind(this));
768 process.once('SIGTERM', process.exit.bind(process, 0));
769 process.once('SIGHUP', process.exit.bind(process, 0));
...
1561
1562 // Set new
1563: this.repl.eval = this.debugEval.bind(this);
1564 this.repl.context = {};
1565
....
1576 Interface.prototype.exitRepl = function() {
1577 // Restore eval
1578: this.repl.eval = this.controlEval.bind(this);
1579
1580 // Swap history
....
1663 this.child = spawn(process.execPath, childArgs);
1664
1665: this.child.stdout.on('data', this.childPrint.bind(this));
1666: this.child.stderr.on('data', this.childPrint.bind(this));
1667 }
1668
C:\Documents and Settings\Jeremiah\My Documents\node\lib\_tls_legacy.js:
705
706 if (this._isServer) {
707: this.ssl.onhandshakestart = onhandshakestart.bind(this);
708: this.ssl.onhandshakedone = onhandshakedone.bind(this);
709: this.ssl.onclienthello = onclienthello.bind(this);
710: this.ssl.onnewsession = onnewsession.bind(this);
711 this.ssl.lastHandshakeTime = 0;
712 this.ssl.handshakes = 0;
713 } else {
714: this.ssl.onocspresponse = onocspresponse.bind(this);
715 }
716
C:\Documents and Settings\Jeremiah\My Documents\node\lib\_tls_wrap.js:
393
394 if (options.isServer) {
395: ssl.onhandshakestart = onhandshakestart.bind(this);
396: ssl.onhandshakedone = onhandshakedone.bind(this);
397: ssl.onclienthello = onclienthello.bind(this);
398: ssl.oncertcb = oncertcb.bind(this);
399: ssl.onnewsession = onnewsession.bind(this);
400 ssl.lastHandshakeTime = 0;
401 ssl.handshakes = 0;
...
411 } else {
412 ssl.onhandshakestart = function() {};
413: ssl.onhandshakedone = this._finishInit.bind(this);
414: ssl.onocspresponse = onocspresponse.bind(this);
415
416 if (options.session)
C:\Documents and Settings\Jeremiah\My Documents\node\lib\console.js:
29 for (var v = 0; v < keys.length; v++) {
30 var k = keys[v];
31: this[k] = this[k].bind(this);
32 }
33 }
C:\Documents and Settings\Jeremiah\My Documents\node\lib\fs.js:
1929 this.fd = fd;
1930 this.emit('open', fd);
1931: }.bind(this));
1932 };
1933
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\lib\cli-engine.js:
275 Object.keys(this.options.rules || {}).forEach(function(name) {
276 validator.validateRuleOptions(name, this.options.rules[name], "CLI");
277: }.bind(this));
278 }
279
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\objects\choices.js:
177 var section = infinite.splice( topIndex, pageSize ).join("\n");
178 return section + "\n" + chalk.dim("(Move up and down to reveal more choices)");
179: }.bind(this);
180 };
181
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\checkbox.js:
62
63 var validation = this.handleSubmitEvents( events.line );
64: validation.success.forEach( this.onEnd.bind(this) );
65: validation.error.forEach( this.onError.bind(this) );
66
67: events.normalizedUpKey.takeUntil( validation.success ).forEach( this.onUpKey.bind(this) );
68: events.normalizedDownKey.takeUntil( validation.success ).forEach( this.onDownKey.bind(this) );
69: events.numberKey.takeUntil( validation.success ).forEach( this.onNumberKey.bind(this) );
70: events.spaceKey.takeUntil( validation.success ).forEach( this.onSpaceKey.bind(this) );
71
72 // Init the prompt
..
194 var len = this.opt.choices.realLength;
195 this.pointer = (this.pointer > 0) ? this.pointer - 1 : len - 1;
196: }.bind(this));
197 };
198
...
201 var len = this.opt.choices.realLength;
202 this.pointer = (this.pointer < len - 1) ? this.pointer + 1 : 0;
203: }.bind(this));
204 };
205
...
210 this.toggleChoice( this.pointer );
211 }
212: }.bind(this));
213 };
214
...
216 this.handleKeypress(function() {
217 this.toggleChoice(this.pointer);
218: }.bind(this));
219 };
220
...
253
254 output += "\n";
255: }.bind(this));
256
257 return output.replace(/\n$/, "");
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\confirm.js:
34 }
35 return value;
36: }.bind(this)
37 });
38
..
59 // Once user confirm (enter key)
60 var events = observe(this.rl);
61: events.keypress.takeUntil( events.line ).forEach( this.onKeypress.bind(this) );
62
63: events.line.take(1).forEach( this.onEnd.bind(this) );
64
65 // Init
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\expand.js:
60 // Save user answer and update prompt to show selected option.
61 var events = observe(this.rl);
62: this.lineObs = events.line.forEach( this.onSubmit.bind(this) );
63: this.keypressObs = events.keypress.forEach( this.onKeypress.bind(this) );
64
65 // Init the prompt
..
114 }
115 output += choiceStr;
116: }.bind(this));
117
118 return output;
...
253 }
254 output += choiceStr;
255: }.bind(this));
256
257 return output;
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\input.js:
39 // Once user confirm (enter key)
40 var events = observe(this.rl);
41: var submit = events.line.map( this.filterInput.bind(this) );
42
43 var validation = this.handleSubmitEvents( submit );
44: validation.success.forEach( this.onEnd.bind(this) );
45: validation.error.forEach( this.onError.bind(this) );
46
47: events.keypress.takeUntil( validation.success ).forEach( this.onKeypress.bind(this) );
48
49 // Init
..
89
90 this.done( state.value );
91: }.bind(this));
92 };
93
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\list.js:
64
65 var events = observe(this.rl);
66: events.normalizedUpKey.takeUntil( events.line ).forEach( this.onUpKey.bind(this) );
67: events.normalizedDownKey.takeUntil( events.line ).forEach( this.onDownKey.bind(this) );
68: events.numberKey.takeUntil( events.line ).forEach( this.onNumberKey.bind(this) );
69: events.line.take(1).forEach( this.onSubmit.bind(this) );
70
71 // Init the prompt
..
147 var len = this.opt.choices.realLength;
148 this.selected = (this.selected > 0) ? this.selected - 1 : len - 1;
149: }.bind(this));
150 };
151
...
154 var len = this.opt.choices.realLength;
155 this.selected = (this.selected < len - 1) ? this.selected + 1 : 0;
156: }.bind(this));
157 };
158
...
162 this.selected = input - 1;
163 }
164: }.bind(this));
165 };
166
...
189 }
190 output += line + " \n";
191: }.bind(this));
192
193 return output.replace(/\n$/, "");
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\password.js:
39
40 // Once user confirm (enter key)
41: var submit = events.line.map( this.filterInput.bind(this) );
42
43 var validation = this.handleSubmitEvents( submit );
44: validation.success.forEach( this.onEnd.bind(this) );
45: validation.error.forEach( this.onError.bind(this) );
46
47: events.keypress.takeUntil( validation.success ).forEach( this.onKeypress.bind(this) );
48
49 // Init
..
101 this.rl.output.mute();
102 }
103: }.bind(this));
104 };
105
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\prompts\rawlist.js:
40 validate: function( index ) {
41 return this.opt.choices.getChoice( index ) != null;
42: }.bind(this)
43 });
44
..
67 // Once user confirm (enter key)
68 var events = observe(this.rl);
69: var submit = events.line.map( this.filterInput.bind(this) );
70
71 var validation = this.handleSubmitEvents( submit );
72: validation.success.forEach( this.onEnd.bind(this) );
73: validation.error.forEach( this.onError.bind(this) );
74
75: events.keypress.takeUntil( validation.success ).forEach( this.onKeypress.bind(this) );
76
77 // Init the prompt
..
186 }
187 output += display;
188: }.bind(this));
189
190 return output;
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\ui\baseUI.js:
24 this.rl.resume();
25
26: this.onForceClose = this.onForceClose.bind(this);
27: this.onKeypress = this.onKeypress.bind(this);
28
29 // Make sure new prompt start on a newline when closing
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\ui\bottom-bar.js:
24 Base.apply( this, arguments );
25
26: this.log = through( this.writeLog.bind(this) );
27 this.bottomBar = opt.bottomBar || "";
28 this.render();
C:\Documents and Settings\Jeremiah\My Documents\node\tools\eslint\node_modules\inquirer\lib\ui\prompt.js:
45
46 // Start running the questions
47: this.process = obs.concatMap( this.processQuestion.bind(this) );
48
49 this.process.forEach(
..
52 throw err;
53 },
54: this.onCompletion.bind(this)
55 );
56
..
79
80 return obs
81: .concatMap( this.setDefaultType.bind(this) )
82: .concatMap( this.filterIfRunnable.bind(this) )
83 .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "message", this.answers ) )
84 .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "default", this.answers ) )
85 .concatMap( utils.fetchAsyncQuestionProperty.bind( null, question, "choices", this.answers ) )
86: .concatMap( this.fetchAnswer.bind(this) );
87: }.bind(this));
88 };
89
111 matches across 32 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment