Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable */
// ../worker-constellation-entry/src/ai/tensor.ts
var TypedArrayProto = Object.getPrototypeOf(Uint8Array);
function isArray(value) {
return Array.isArray(value) || value instanceof TypedArrayProto;
}
function arrLength(obj) {
return obj instanceof TypedArrayProto
? obj.length
: obj
@Miciurash
Miciurash / detect-browsers.js
Created November 8, 2020 06:32
Detect browsers
/**
* Detect browsers
*/
// Opera
var isOpera =
(navigator.userAgent.indexOf('Opera') || navigator.userAgent.indexOf('OPR')) != -1;
// Firefox
var isFirefox = navigator.userAgent.indexOf('Firefox') != -1;
// Safari
var isSafari = navigator.userAgent.indexOf('Safari') != -1;