From 73be17508d1805652944b185c93c6bce532b9dfc Mon Sep 17 00:00:00 2001 From: JBallin Date: Tue, 22 Jan 2019 09:09:48 -0800 Subject: [PATCH] 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.