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

bowser-castle

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bowser-castle - npm Package Compare versions

Comparing version 0.2.8 to 0.3.0

3

dist/bowserCastle.d.ts

@@ -7,3 +7,2 @@ export interface IBowserCastle {

}
declare const bowserCastle: IBowserCastle;
export default bowserCastle;
export declare const bowserCastle: (userAgent?: string) => IBowserCastle;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Bowser = require("bowser");
const detect = (userAgent) => {
const browserInfo = Bowser.getParser(userAgent !== null && userAgent !== void 0 ? userAgent : '');
exports.bowserCastle = void 0;
const bowser = require("bowser");
const bowserCastle = (userAgent) => {
if (!userAgent && typeof navigator !== "undefined") {
userAgent = navigator.userAgent;
}
const browserInfo = bowser.getParser(userAgent !== null && userAgent !== void 0 ? userAgent : '');
return {

@@ -13,4 +17,3 @@ mobile: browserInfo.getPlatformType(true) === "mobile",

};
const bowserCastle = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '');
exports.default = bowserCastle;
exports.bowserCastle = bowserCastle;
//# sourceMappingURL=bowserCastle.js.map
{
"name": "bowser-castle",
"version": "0.2.8",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/bowserCastle.js",

@@ -1,2 +0,2 @@

import * as Bowser from "bowser";
import * as bowser from "bowser";

@@ -10,4 +10,8 @@ export interface IBowserCastle {

const detect = (userAgent: string): IBowserCastle => {
const browserInfo = Bowser.getParser(userAgent ?? '');
export const bowserCastle = (userAgent?: string): IBowserCastle => {
if (!userAgent && typeof navigator !== "undefined") {
userAgent = navigator.userAgent;
}
const browserInfo = bowser.getParser(userAgent ?? '');
return {

@@ -20,5 +24,1 @@ mobile: browserInfo.getPlatformType(true) === "mobile",

}
const bowserCastle: IBowserCastle = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '');
export default bowserCastle;

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