Socket
Socket
Sign inDemoInstall

uadetect

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-alpha-1 to 7.0.0-alpha-2

uaData.d.ts

11

index.d.ts

@@ -39,6 +39,7 @@ /**

import { registerServiceWorker } from './sw';
import { userAgentData, getUserAgentData, type UserAgentData } from './uaData';
import { type VibrateResult, vibrate } from './vibrate';
import { type RobotStatus, getBots, robotStatus } from './webdriver';
export { getScreenOrientation as getScreenOrientation, getDeviceType as getDeviceType, getExactMobileDeviceType as getExactMobileDeviceType, getCurrentUA, getCookies, getBrowser, browserSpecificSupportCores, getMaxTouchPoints, getOS, getterForNavigator, getBrowserIsOnline, getPDF, getBots, getLang, browserSpecificGetMemory as getMemory, vibrate, canShareData, registerServiceWorker, getClipboardText, getClipboardAdvanced, setClipboardAdvanced, setClipboardText };
export { orientationIsLandscape, orientationIsPortrait, deviceType as deviceType, exactMobileDeviceType, currentUA, cookieStatus, browser, processorCores, maxTouchPoints, navigatorObject, browserOnlineStatus, PDFviewerStatus, robotStatus, OS, lat, lon, language, deviceMemory, permissionGranted };
export { getScreenOrientation as getScreenOrientation, getDeviceType as getDeviceType, getExactMobileDeviceType as getExactMobileDeviceType, getCurrentUA, getCookies, getBrowser, browserSpecificSupportCores, getMaxTouchPoints, getOS, getterForNavigator, getBrowserIsOnline, getPDF, getBots, getLang, browserSpecificGetMemory as getMemory, vibrate, canShareData, registerServiceWorker, getClipboardText, getClipboardAdvanced, setClipboardAdvanced, setClipboardText, getUserAgentData };
export { orientationIsLandscape, orientationIsPortrait, deviceType as deviceType, exactMobileDeviceType, currentUA, cookieStatus, browser, processorCores, maxTouchPoints, navigatorObject, browserOnlineStatus, PDFviewerStatus, robotStatus, OS, lat, lon, language, deviceMemory, permissionGranted, userAgentData };
export interface __UADetect {

@@ -69,2 +70,3 @@ readonly getDeviceType: () => DeviceType;

readonly permissionGranted: (name: PermissionName) => Promise<boolean>;
readonly getUserAgentData: () => UserAgentData;
readonly orientationIsLandscape: boolean;

@@ -90,2 +92,3 @@ readonly orientationIsPortrait: boolean;

readonly audioAndCamera: MediaStreamResult;
readonly userAgentData: UserAgentData;
}

@@ -115,3 +118,4 @@ declare const UADetect: __UADetect;

audioAndCamera: MediaStreamResult;
private refresh;
userAgentData: UserAgentData;
private __refresh;
getDeviceType(): DeviceType;

@@ -135,2 +139,3 @@ getScreenOrientation(): void;

registerServiceWorker(path: string | URL, options?: RegistrationOptions): void;
getUserAgentData(): UserAgentData;
getMedia(constraints: MediaConstraints): MediaStreamResult;

@@ -137,0 +142,0 @@ getClipboardText(): Promise<string>;

@@ -64,2 +64,4 @@ /**

import { registerServiceWorker } from './sw';
// uaData
import { userAgentData, getUserAgentData } from './uaData';
// Vibrate

@@ -71,5 +73,5 @@ import { vibrate } from './vibrate';

// Make the unknowns accessible
export { getScreenOrientation as getScreenOrientation, getDeviceType as getDeviceType, getExactMobileDeviceType as getExactMobileDeviceType, getCurrentUA, getCookies, getBrowser, browserSpecificSupportCores, getMaxTouchPoints, getOS, getterForNavigator, getBrowserIsOnline, getPDF, getBots, getLang, browserSpecificGetMemory as getMemory, vibrate, canShareData, registerServiceWorker, getClipboardText, getClipboardAdvanced, setClipboardAdvanced, setClipboardText };
export { getScreenOrientation as getScreenOrientation, getDeviceType as getDeviceType, getExactMobileDeviceType as getExactMobileDeviceType, getCurrentUA, getCookies, getBrowser, browserSpecificSupportCores, getMaxTouchPoints, getOS, getterForNavigator, getBrowserIsOnline, getPDF, getBots, getLang, browserSpecificGetMemory as getMemory, vibrate, canShareData, registerServiceWorker, getClipboardText, getClipboardAdvanced, setClipboardAdvanced, setClipboardText, getUserAgentData };
// As well as the returns on those unknowns
export { orientationIsLandscape, orientationIsPortrait, deviceType as deviceType, exactMobileDeviceType, currentUA, cookieStatus, browser, processorCores, maxTouchPoints, navigatorObject, browserOnlineStatus, PDFviewerStatus, robotStatus, OS, lat, lon, language, deviceMemory, permissionGranted };
export { orientationIsLandscape, orientationIsPortrait, deviceType as deviceType, exactMobileDeviceType, currentUA, cookieStatus, browser, processorCores, maxTouchPoints, navigatorObject, browserOnlineStatus, PDFviewerStatus, robotStatus, OS, lat, lon, language, deviceMemory, permissionGranted, userAgentData };
// Create the UADetect Object

@@ -149,24 +151,28 @@ const UADetect = {

},
getUserAgentData: () => {
return getUserAgentData();
},
// From here, we can then begin to call the returns on those unknowns here
// Most of them are just transferring the name over
orientationIsLandscape: orientationIsLandscape,
orientationIsPortrait: orientationIsPortrait,
deviceType: deviceType,
exactMobileDeviceType: exactMobileDeviceType,
currentUA: currentUA,
cookieStatus: cookieStatus,
browser: browser,
maxTouchPoints: maxTouchPoints,
navigatorObject: navigatorObject,
browserOnlineStatus: browserOnlineStatus,
PDFviewerStatus: PDFviewerStatus,
robotStatus: robotStatus,
OS: OS,
lat: lat,
lon: lon,
language: language,
deviceMemory: deviceMemory,
camera: camera,
audio: audio,
audioAndCamera: audioAndCamera,
orientationIsLandscape,
orientationIsPortrait,
deviceType,
exactMobileDeviceType,
currentUA,
cookieStatus,
browser,
maxTouchPoints,
navigatorObject,
browserOnlineStatus,
PDFviewerStatus,
robotStatus,
OS,
lat,
lon,
language,
deviceMemory,
camera,
audio,
audioAndCamera,
userAgentData
};

@@ -196,84 +202,89 @@ export default UADetect;

this.audioAndCamera = audioAndCamera;
this.userAgentData = userAgentData;
}
refresh() {
__refresh() {
return new uaDetect();
}
getDeviceType() {
this.refresh();
this.__refresh();
return getDeviceType();
}
getScreenOrientation() {
this.refresh();
this.__refresh();
return getScreenOrientation();
}
getExactMobileDeviceType() {
this.refresh();
this.__refresh();
return getExactMobileDeviceType();
}
getCurrentUA() {
this.refresh();
this.__refresh();
return getCurrentUA();
}
getCookieStatus() {
this.refresh();
this.__refresh();
return getCookies();
}
getBrowser() {
this.refresh();
this.__refresh();
return getBrowser();
}
getProcessorCores() {
this.refresh();
this.__refresh();
return browserSpecificSupportCores();
}
getMaxTouchPoints() {
this.refresh();
this.__refresh();
return getMaxTouchPoints();
}
getNavigatorObject() {
this.refresh();
this.__refresh();
return getterForNavigator();
}
getBrowserOnlineStatus() {
this.refresh();
this.__refresh();
return getBrowserIsOnline();
}
getPDFviewerStatus() {
this.refresh();
this.__refresh();
return getPDF();
}
getRobotStatus() {
this.refresh();
this.__refresh();
return getBots();
}
getOS() {
this.refresh();
this.__refresh();
return getOS();
}
getLang() {
this.refresh();
this.__refresh();
return getLang();
}
getMemory() {
this.refresh();
this.__refresh();
return browserSpecificGetMemory();
}
vibrate(pattern) {
this.refresh();
this.__refresh();
return vibrate(pattern);
}
canShareData(data) {
this.refresh();
this.__refresh();
return canShareData(data);
}
registerServiceWorker(path, options) {
this.refresh();
this.__refresh();
return registerServiceWorker(path, options);
}
getUserAgentData() {
this.__refresh();
return getUserAgentData();
}
async getMedia(constraints) {
this.refresh();
this.__refresh();
return await getMedia(constraints);
}
async getClipboardText() {
this.refresh();
this.__refresh();
return await getClipboardText();

@@ -280,0 +291,0 @@ }

@@ -74,3 +74,3 @@ {

"types": "./index.d.ts",
"version": "7.0.0-alpha-1"
"version": "7.0.0-alpha-2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc