Skip to content

Commit

Permalink
Merge pull request #284 from JBallin/readme-import-instructions
Browse files Browse the repository at this point in the history
Update instructions to use default import
  • Loading branch information
lancedikson authored Jan 22, 2019
2 parents 3b2fa91 + 73be175 commit c5d18a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ _For legacy code, check out the [1.x](https://github.com/lancedikson/bowser/tree

# Use cases

First of all, require the library. This is a UMD Module, so it will work for AMD, Typescript and CommonJS module systems.
First of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems.

```javascript
const Bowser = require("bowser"); // CommonJS

import * as Bowser from "bowser" // Typescript
import * as Bowser from "bowser"; // TypeScript

import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled)
```

By default, the exported version is the *ES5 transpiled version*, which **do not** include any polyfills.
Expand Down

0 comments on commit c5d18a4

Please sign in to comment.