Skip to content
Browse files

making completion code a bit more readable

  • Loading branch information...
1 parent 96a634e commit 0a253e853a5a71b84fd79600f252a07a55828066 @rksm rksm committed Sep 8, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 completion.js
View
12 completion.js
@@ -75,13 +75,11 @@ Completion.prototype.dotCompletion = function dotCompletion (str, regex, skipPre
getProps(
obj, function (name) {
// Filter out numeric indices
- if(!name.match(/^[0-9]*$/)) {
- if (regex) {
- if (name.match(regex))
- r.push(addPrefix + name);
- } else {
- r.push(addPrefix + name);
- }
+ if (name.match(/^[0-9]*$/)) return;
+ if (regex) {
+ if (name.match(regex)) r.push(addPrefix + name);
+ } else {
+ r.push(addPrefix + name);
}
});

0 comments on commit 0a253e8

Please sign in to comment.
Something went wrong with that request. Please try again.