Socket
Socket
Sign inDemoInstall

bowser

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bowser - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2

compiled.js

6

CHANGELOG.md
# Bowser Changelog
### 2.0.0-alpha.2 (July 17, 2018)
- [CHANGE] Make `src/bowser` main file instead of the bundled one
- [CHANGE] Move the bundled file to the root of the package to make it possible to `require('bowser/compiled')` (#231)
- [REMOVE] Remove `typings.d.ts` before stable release (#232)
- [FIX] Improve Nexus devices detection (#233)
### 2.0.0-alpha.1 (July 9, 2018)

@@ -4,0 +10,0 @@ - [ADD] `Bowser.getParser()`

5

package.json
{
"name": "bowser",
"version": "2.0.0-alpha.1",
"version": "2.0.0-alpha.2",
"description": "Lightweight browser detector",

@@ -23,4 +23,3 @@ "keywords": [

],
"main": "./dist/bowser.compiled.js",
"typings": "./typings.d.ts",
"main": "src/bowser.js",
"repository": {

@@ -27,0 +26,0 @@ "type": "git",

19

README.md

@@ -25,3 +25,3 @@ ## Bowser

```
```javascript
const bowser = require('bowser');

@@ -34,3 +34,3 @@ ```

```
```javascript
const browser = bowser.getParser(window.navigator.userAgent);

@@ -44,3 +44,3 @@

```
```javascript
const impression = new Impression();

@@ -56,3 +56,3 @@

```
```javascript
const browser = bowser.getParser(window.navigator.userAgent);

@@ -88,3 +88,3 @@ impression.userTechData = browser.parse();

```
```javascript
const browser = bowser.getParsers(window.navigator.userAgent);

@@ -119,6 +119,7 @@ const isValidBrowser = browser.satisfies({

# Advanced Usage
By default, `require('bowser')` requires the pre-compiled file, which can
include useless for you polyfills. In case you don't need that, you can choose
using source file requiring bowser like that: `require('bowser/src/bowser`);
Then you get ES2015 file, which is not precompiled and can be easier to debug.
By default, `require('bowser')` requires the *ES6 version of files*, which
**don't** include any polyfills. In case if you don't use your own `babel-polyfill`
you may need to have pre-built bundle with all needed polyfills.
It's possible requiring bowser like that: `require('bowser/compiled');`
As result you get a ES5 file with `babel-polyfill` bundled in it.

@@ -125,0 +126,0 @@ # Contributing

@@ -17,3 +17,3 @@ import { getFirstMatch } from './utils';

{
test: [/nexus\s*[0-9]+/i],
test: [/nexus\s*(?:7|8|9|10).*/i],
describe() {

@@ -91,3 +91,3 @@ return {

{
test: [/nexus\s*[0-6]\s*/i, /galaxy nexus/i],
test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
describe() {

@@ -94,0 +94,0 @@ return {

@@ -12,6 +12,6 @@ const path = require('path');

// options related to how webpack emits results
path: path.resolve(__dirname, 'dist'), // string
path: path.resolve(__dirname, './'), // string
// the target directory for all output files
// must be an absolute path (use the Node.js path module)
filename: 'bowser.compiled.js', // string
filename: 'compiled.js', // string
// the filename template for entry chunks

@@ -18,0 +18,0 @@ library: 'bowser',

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