Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/platform

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/platform - npm Package Compare versions

Comparing version 0.0.105 to 0.1.0

./dist/index.cjs

4

dist/index.d.ts

@@ -33,2 +33,4 @@ /** Is Android Device */

declare const isChrome: boolean;
/** Browser is Brave */
declare const isBrave: boolean;
/** Browser using Gecko Rendering Engine */

@@ -47,2 +49,2 @@ declare const isGecko: boolean;

export { isAndroid, isAppleDevice, isBlink, isChrome, isChromium, isEdge, isEdgeHTML, isFirefox, isGecko, isIE, isIOS, isIPad, isIPhone, isIPod, isMac, isMobile, isOpera, isPresto, isSafari, isTrident, isWebKit, isWindows };
export { isAndroid, isAppleDevice, isBlink, isBrave, isChrome, isChromium, isEdge, isEdgeHTML, isFirefox, isGecko, isIE, isIOS, isIPad, isIPhone, isIPod, isMac, isMobile, isOpera, isPresto, isSafari, isTrident, isWebKit, isWindows };

@@ -6,3 +6,3 @@ import { isServer } from 'solid-js/web';

var n = w.navigator;
var ua = isServer ? "" : n.userAgent;
var ua = n.userAgent;
var isAndroid = /* @__PURE__ */ /Android/.test(ua);

@@ -19,3 +19,3 @@ var isWindows = /* @__PURE__ */ /(win32|win64|windows|wince)/i.test(ua);

var isOpera = !!w.opr && !!w.opr.addons || !!w.opera || /* @__PURE__ */ / OPR\//.test(ua);
var isSafari = /* @__PURE__ */ /constructor/i.test(w.HTMLElement) || w.safari?.pushNotification + "" === "[object SafariRemoteNotification]";
var isSafari = !!n.vendor && n.vendor.includes("Apple") && ua && !ua.includes("CriOS") && !ua.includes("FxiOS");
var isIE = !!w.document.documentMode;

@@ -25,2 +25,3 @@ var isChromium = !!w.chrome;

var isChrome = isChromium && n.vendor === "Google Inc." && !isOpera && !isEdge;
var isBrave = !!n.brave && n.brave.isBrave && n.brave.isBrave.name === "isBrave";
var isGecko = /* @__PURE__ */ /Gecko\/[0-9.]+/.test(ua);

@@ -33,2 +34,2 @@ var isBlink = /* @__PURE__ */ /Chrome\/[0-9.]+/.test(ua);

export { isAndroid, isAppleDevice, isBlink, isChrome, isChromium, isEdge, isEdgeHTML, isFirefox, isGecko, isIE, isIOS, isIPad, isIPhone, isIPod, isMac, isMobile, isOpera, isPresto, isSafari, isTrident, isWebKit, isWindows };
export { isAndroid, isAppleDevice, isBlink, isBrave, isChrome, isChromium, isEdge, isEdgeHTML, isFirefox, isGecko, isIE, isIOS, isIPad, isIPhone, isIPod, isMac, isMobile, isOpera, isPresto, isSafari, isTrident, isWebKit, isWindows };
{
"name": "@solid-primitives/platform",
"version": "0.0.105",
"version": "0.1.0",
"description": "A set of const boolean variables identifying device and browser type.",

@@ -52,9 +52,12 @@ "author": "Damian Tarnawski <gthetarnav@gmail.com>",

"typesVersions": {},
"devDependencies": {
"solid-js": "^1.7.11"
},
"scripts": {
"dev": "vite serve dev",
"page": "vite build dev",
"build": "jiti ../../scripts/build.ts",
"test": "vitest -c ../../configs/vitest.config.ts",
"test:ssr": "pnpm run test --mode ssr"
"dev": "tsx ../../scripts/dev.ts",
"build": "tsx ../../scripts/build.ts",
"vitest": "vitest -c ../../configs/vitest.config.ts",
"test": "pnpm run vitest",
"test:ssr": "pnpm run vitest --mode ssr"
}
}

@@ -19,2 +19,4 @@ <p>

# or
pnpm add @solid-primitives/platform
# or
yarn add @solid-primitives/platform

@@ -37,2 +39,6 @@ ```

> **Note:** This package is tree-shakable, all unused variables will be removed from the bundle.
> **Note:** On the server, all variables will be `false`.
## List of variables

@@ -76,2 +82,4 @@

- `isBrave` — Browser is Brave
### Rendering Engine

@@ -78,0 +86,0 @@

Sorry, the diff of this file is not supported yet

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