New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webext-detect-page

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webext-detect-page - npm Package Compare versions

Comparing version 4.2.1 to 5.0.0

6

index.d.ts

@@ -32,3 +32,3 @@ export declare function disableWebextDetectPageCache(): void;

export declare const isMobileSafari: () => boolean;
export declare const contextNames: {
declare const contextChecks: {
readonly contentScript: () => boolean;

@@ -43,3 +43,5 @@ readonly background: () => boolean;

};
export type ContextName = keyof typeof contextNames;
export type ContextName = keyof typeof contextChecks;
export declare const contextNames: ("contentScript" | "background" | "options" | "sidePanel" | "devTools" | "devToolsPage" | "extension" | "web")[];
export declare function getContextName(): ContextName | 'unknown';
export {};

@@ -89,3 +89,3 @@ let cache = true;

export const isMobileSafari = () => isSafari() && globalThis.navigator?.userAgent.includes('Mobile');
export const contextNames = {
const contextChecks = {
contentScript: isContentScript,

@@ -100,4 +100,5 @@ background: isBackground,

};
export const contextNames = Object.keys(contextChecks);
export function getContextName() {
for (const [name, test] of Object.entries(contextNames)) {
for (const [name, test] of Object.entries(contextChecks)) {
if (test()) {

@@ -104,0 +105,0 @@ return name;

{
"name": "webext-detect-page",
"version": "4.2.1",
"version": "5.0.0",
"description": "Detects where the current browser extension code is being run. Compatible with Firefox, Chrome and derivates.",

@@ -21,7 +21,8 @@ "keywords": [

"repository": "fregante/webext-detect-page",
"funding": "https://github.com/sponsors/fregante",
"license": "MIT",
"author": "Federico Brigante <me@fregante.com> (https://fregante.com)",
"type": "module",
"main": "index.js",
"module": "index.js",
"exports": "./index.js",
"types": "./index.d.ts",
"files": [

@@ -38,7 +39,10 @@ "index.js",

"devDependencies": {
"@sindresorhus/tsconfig": "^2.0.0",
"@sindresorhus/tsconfig": "^5.0.0",
"@types/chrome": "^0.0.254",
"typescript": "^4.5.3",
"xo": "^0.55.0"
"typescript": "^5.3.3",
"xo": "^0.56.0"
},
"engines": {
"node": ">=18"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc