diff --git a/lib/util.js b/lib/util.js index b59bae5067..1b168bfd94 100644 --- a/lib/util.js +++ b/lib/util.js @@ -505,6 +505,11 @@ function isFunction(arg) { } exports.isFunction = isFunction; +function isPrimitive(arg) { + return !(arg instanceof Object); +} +exports.isPrimitive = isPrimitive; + function isBuffer(arg) { return arg instanceof Buffer; }