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

ua-is-frozen

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ua-is-frozen

A freeze-test for your user-agent string

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61K
increased by33.59%
Maintainers
0
Weekly downloads
 
Created
Source

ua-is-frozen

A freeze-test for your user-agent string

npm i ua-is-frozen

* isFrozenUA(ua:string):boolean

Check whether a user-agent string match with frozen user-agent pattern

Code Example

import { isFrozenUA } from 'ua-is-frozen';

const oldChrome = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.1234.56 Safari/537.36"
const newChrome = "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Mobile Safari/537.36";
const firefox = "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0";

console.log(isFrozenUA(oldChrome)); // false
console.log(isFrozenUA(newChrome)); // true
console.log(isFrozenUA(firefox));   // false

Keywords

FAQs

Package last updated on 07 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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