function IsCloneable(value) {
    if (Object(value) !== value) {
      // Primitive value
      return true;
    }

    switch ({}.toString.call(value).slice(8, -1)) {
      // Class
      case "Boolean":
      case "Number":
      case "String":
      case "Date":
      case "RegExp":
      case "Blob":
      case "FileList":
      case "ImageData":
      case "ImageBitmap":
      case "ArrayBuffer":
        return true;

      case "Array":
      case "Object":
        return Object.keys(value).every(function (prop) {
          return Utils.IsCloneable(value[prop]);
        });

      case "Map":
        return _toConsumableArray(value.keys()).every(Utils.IsCloneable) && _toConsumableArray(value.values()).every(Utils.IsCloneable);

      case "Set":
        return _toConsumableArray(value.keys()).every(Utils.IsCloneable);

      default:
        return false;
    }
  }
/**
   * Determine if the given value is cloneable - Data passed in messages must be cloneable
   *
   * @param {*} value - Value to check
   * @returns {boolean} - Whether or not the value is cloneable
   */
Determine if the given value is cloneable - Data passed in messages must be cloneable
@param {*} value - Value to check
@returns {boolean} - Whether or not the value is cloneable
Determine if the given value is cloneable - Data passed in messages must be cloneable @param { * } value - Value to check @returns { boolean } - Whether or not the value is cloneable
function IsCloneable(value) {
    if (Object(value) !== value) {
      return true;
    }
    switch ({}.toString.call(value).slice(8, -1)) {
      case "Boolean":
      case "Number":
      case "String":
      case "Date":
      case "RegExp":
      case "Blob":
      case "FileList":
      case "ImageData":
      case "ImageBitmap":
      case "ArrayBuffer":
        return true;
      case "Array":
      case "Object":
        return Object.keys(value).every(function (prop) {
          return Utils.IsCloneable(value[prop]);
        });
      case "Map":
        return _toConsumableArray(value.keys()).every(Utils.IsCloneable) && _toConsumableArray(value.values()).every(Utils.IsCloneable);
      case "Set":
        return _toConsumableArray(value.keys()).every(Utils.IsCloneable);
      default:
        return false;
    }
  }
function IsCloneable ( value ) { if ( Object ( value ) !== value ) { return true ; } switch ( { } . toString . call ( value ) . slice ( 8 , - 1 ) ) { case "Boolean" : case "Number" : case "String" : case "Date" : case "RegExp" : case "Blob" : case "FileList" : case "ImageData" : case "ImageBitmap" : case "ArrayBuffer" : return true ; case "Array" : case "Object" : return Object . keys ( value ) . every ( function ( prop ) { return Utils . IsCloneable ( value [ prop ] ) ; } ) ; case "Map" : return _toConsumableArray ( value . keys ( ) ) . every ( Utils . IsCloneable ) && _toConsumableArray ( value . values ( ) ) . every ( Utils . IsCloneable ) ; case "Set" : return _toConsumableArray ( value . keys ( ) ) . every ( Utils . IsCloneable ) ; default : return false ; } }
Determine if the given value is cloneable - Data passed in messages must be cloneable
 @param {*} value - Value to check
 @returns {boolean} - Whether or not the value is cloneable
Determine if the given value is cloneable - Data passed in messages must be cloneable @param { * } value - Value to check @returns { boolean } - Whether or not the value is cloneable
// Primitive value // Class