Skip to content

Commit

Permalink
Merge pull request #38 from ostrojs/develop
Browse files Browse the repository at this point in the history
Develop (#37)
  • Loading branch information
amarksingh authored Dec 28, 2023
2 parents 04b29fb + 5739915 commit f040ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions function.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports.setPropertyToClassProto = function (proto, obj) {
exports.count = function ($value) {
if (Array.isArray($value))
return $value.length
else if (typeof $value == 'object')
else if ($value && typeof $value == 'object')
return Object.keys($value).length
else
return 0
Expand Down Expand Up @@ -172,7 +172,7 @@ exports.is_array = function (data) {
}

exports.method_exists = function (instance = {}, method) {
return method in instance && typeof instance[method] == 'function'
return method in instance && typeof instance[method] == 'function'
}

exports.is_callable = function ($cb) {
Expand Down

0 comments on commit f040ef5

Please sign in to comment.