Skip to content

Commit 8faef1a

Browse files
authoredJan 12, 2017
Merge pull request #4 from pedrovagner/master
Fixed Node REPL Object context which produced false negative errors.
2 parents 1e92ce6 + ddbfed9 commit 8faef1a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ logs
66
*.log
77
npm-debug.log*
88

9+
# IDEs and editors
10+
/.idea
11+
/.vscode
12+
913
# Runtime data
1014
pids
1115
*.pid

‎index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ var TEST_REGEX = /^\$|\./,
44
REPLACE_REGEX = /^\$|\./g;
55

66
function isPlainObject(obj) {
7-
if(obj === null || typeof obj !== 'object') {
8-
return false;
9-
}
10-
var proto = Object.getPrototypeOf(obj);
11-
return proto === Object.prototype || proto === null;
7+
return typeof obj === 'object' && obj !== null;
128
}
139

1410
function withEach(target, cb) {

0 commit comments

Comments
 (0)
Please sign in to comment.