projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0a9985
)
repl: use Object.getPrototypeOf on functions for tab complete()
author
Nathan Rajlich
<nathan@tootallnate.net>
Sat, 21 Apr 2012 20:53:49 +0000
(13:53 -0700)
committer
Nathan Rajlich
<nathan@tootallnate.net>
Sat, 21 Apr 2012 20:53:49 +0000
(13:53 -0700)
lib/repl.js
patch
|
blob
|
history
diff --git
a/lib/repl.js
b/lib/repl.js
index
0a81ebc
..
9cd88af
100644
(file)
--- a/
lib/repl.js
+++ b/
lib/repl.js
@@
-589,7
+589,7
@@
REPLServer.prototype.complete = function(line, callback) {
try {
var sentinel = 5;
var p;
- if (typeof obj ==
'object
') {
+ if (typeof obj ==
= 'object' || typeof obj === 'function
') {
p = Object.getPrototypeOf(obj);
} else {
p = obj.constructor ? obj.constructor.prototype : null;