From fed702a14889a7d50846294f31e8d0401a052893 Mon Sep 17 00:00:00 2001 From: JBallin Date: Tue, 22 Jan 2019 09:08:50 -0800 Subject: [PATCH 1/2] Fix 'TypeScript' capitalization and add missing semicolon --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a9db3c7..3bfada9 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,12 @@ The upcoming 2.0 version has drastically changed API. All available methods can # 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 and CommonJS module systems. ```javascript const Bowser = require("bowser"); // CommonJS -import * as Bowser from "bowser" // Typescript +import * as Bowser from "bowser"; // TypeScript ``` By default, the exported version is the *ES5 transpiled version*, which **do not** include any polyfills. From 73be17508d1805652944b185c93c6bce532b9dfc Mon Sep 17 00:00:00 2001 From: JBallin Date: Tue, 22 Jan 2019 09:09:48 -0800 Subject: [PATCH 2/2] Add ES6 import example --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bfada9..2161d66 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,14 @@ The upcoming 2.0 version has drastically changed API. All available methods can # 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 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.