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

sniff-fns

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sniff-fns - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

3

lib/which_os/index.js

@@ -5,2 +5,3 @@ var isAndroid = require('../is_android')

var isMac = require('../is_mac')
var isLinux = require('../is_linux')
var isWindows = require('../is_windows')

@@ -18,2 +19,4 @@ var isWindowsPhone = require('../is_windows_phone')

return 'windows mobile'
} else if (isLinux(str)) {
return 'linux'
} else if (isMac(str)) {

@@ -20,0 +23,0 @@ return 'mac'

@@ -74,4 +74,14 @@ const test = require('ava')

test('whichOS detects "linux"', (t) => {
;[
'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0',
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.32 (KHTML, like Gecko) Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/537.32 Epiphany/3.8.2',
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1636.0 Safari/537.36'
].forEach((ua) => {
t.is(whichOS(ua), 'linux')
})
})
test("whichOS returns if OS can't be detected", (t) => {
t.is(whichOS('wutOS'), undefined)
})

2

package.json
{
"name": "sniff-fns",
"version": "0.5.2",
"version": "0.5.3",
"author": "Ivan Shornikov <paraboom@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

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