Skip to content

Commit 79abe65

Browse files
author
Matus Szabo
committed
added: isObject validation method
1 parent 52460d9 commit 79abe65

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/validator.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ validator.isArray = function(value) {
2929
return Array.isArray(value);
3030
};
3131

32+
validator.isObject = function(value) {
33+
return Object.prototype.toString.call(value) === '[object Object]';
34+
};
35+
3236
validator.isBoolean = function(value) {
3337
return typeof value === 'boolean';
3438
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nodee-utils",
33
"preferGlobal": false,
4-
"version": "1.2.3",
4+
"version": "1.2.4",
55
"author": "NODEE - Matus Szabo <[email protected]>",
66
"description": "set of useful helpers",
77
"main": "./index.js",

0 commit comments

Comments
 (0)