JAVASCRIPT 23
Util.js Guest on 4th May 2021 07:54:16 AM
  1. 'use strict';
  2.  
  3. module.exports = {
  4.   isString: function(arg) {
  5.     return typeof(arg) === 'string';
  6.   },
  7.   isObject: function(arg) {
  8.     return typeof(arg) === 'object' && arg !== null;
  9.   },
  10.   isNull: function(arg) {
  11.     return arg === null;
  12.   },
  13.   isNullOrUndefined: function(arg) {
  14.     return arg == null;
  15.   }
  16. };

Paste-bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.