Browse Source

util: add isPrimitive check

v0.11.5-release
Trevor Norris 12 years ago
parent
commit
3158ffb6ef
  1. 5
      lib/util.js

5
lib/util.js

@ -505,6 +505,11 @@ function isFunction(arg) {
} }
exports.isFunction = isFunction; exports.isFunction = isFunction;
function isPrimitive(arg) {
return !(arg instanceof Object);
}
exports.isPrimitive = isPrimitive;
function isBuffer(arg) { function isBuffer(arg) {
return arg instanceof Buffer; return arg instanceof Buffer;
} }

Loading…
Cancel
Save