@sendbird/uikit-react
Version:
Sendbird UIKit for React: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
42 lines (39 loc) • 1.06 kB
JavaScript
;
/**
* @param ms - milliseconds to delay
* @returns Promise that resolves after the specified time
*/
var noop = function () {
/** noop * */
};
var deleteNullish = function (obj) {
var cleaned = {};
Object.entries(obj).forEach(function (_a) {
var key = _a[0], value = _a[1];
if (value !== undefined && value !== null) {
cleaned[key] = value;
}
});
return cleaned;
};
function openURL(url) {
var safeURL = url;
if (safeURL) {
if (!safeURL.startsWith('http://') && !safeURL.startsWith('https://')) {
safeURL = 'https://' + safeURL;
}
window.open(safeURL, '_blank', 'noopener,noreferrer');
}
}
function classnames() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return args.filter(Boolean).join(' ');
}
exports.classnames = classnames;
exports.deleteNullish = deleteNullish;
exports.noop = noop;
exports.openURL = openURL;
//# sourceMappingURL=bundle-CkQrhwR6.js.map