diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index ef7403f..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,290 +0,0 @@
-## 0.0.39 (2018-08-29)
-
-* 0.0.39 ([8abba86](https://github.com/wessberg/browserslist-generator/commit/8abba86))
-* Bumped deps ([279aaf3](https://github.com/wessberg/browserslist-generator/commit/279aaf3))
-* Bumped version ([28657ac](https://github.com/wessberg/browserslist-generator/commit/28657ac))
-
-
-
-## 0.0.38 (2018-07-30)
-
-* 0.0.38 ([d1ab3b6](https://github.com/wessberg/browserslist-generator/commit/d1ab3b6))
-* Bumped deps ([999dc31](https://github.com/wessberg/browserslist-generator/commit/999dc31))
-* Bumped version ([7c439f3](https://github.com/wessberg/browserslist-generator/commit/7c439f3))
-
-
-
-## 0.0.37 (2018-06-15)
-
-* 0.0.37 ([7344be4](https://github.com/wessberg/browserslist-generator/commit/7344be4))
-* Bumped version ([03b4e8e](https://github.com/wessberg/browserslist-generator/commit/03b4e8e))
-* Fixed a bug ([c72972c](https://github.com/wessberg/browserslist-generator/commit/c72972c))
-
-
-
-## 0.0.36 (2018-06-13)
-
-* 0.0.36 ([b9aef38](https://github.com/wessberg/browserslist-generator/commit/b9aef38))
-* Added additional memory caching ([35b6bbc](https://github.com/wessberg/browserslist-generator/commit/35b6bbc))
-* Bumped version ([5fe4c07](https://github.com/wessberg/browserslist-generator/commit/5fe4c07))
-
-
-
-## 0.0.35 (2018-06-13)
-
-* 0.0.35 ([1b57d01](https://github.com/wessberg/browserslist-generator/commit/1b57d01))
-* Added more feature corrections ([7c1a948](https://github.com/wessberg/browserslist-generator/commit/7c1a948))
-* Bumped version ([932de4f](https://github.com/wessberg/browserslist-generator/commit/932de4f))
-
-
-
-## 0.0.34 (2018-06-13)
-
-* 0.0.34 ([1779931](https://github.com/wessberg/browserslist-generator/commit/1779931))
-* Bumped version ([f29cf0e](https://github.com/wessberg/browserslist-generator/commit/f29cf0e))
-* Made it possible to pass both Caniuse and MDN features to the same functions to allow for mixing and ([97fe6a9](https://github.com/wessberg/browserslist-generator/commit/97fe6a9))
-
-
-
-## 0.0.33 (2018-06-13)
-
-* 0.0.33 ([8192260](https://github.com/wessberg/browserslist-generator/commit/8192260))
-* Bumped version ([56874a5](https://github.com/wessberg/browserslist-generator/commit/56874a5))
-* Fixed a bug ([c069736](https://github.com/wessberg/browserslist-generator/commit/c069736))
-
-
-
-## 0.0.32 (2018-06-13)
-
-* 0.0.32 ([6e59464](https://github.com/wessberg/browserslist-generator/commit/6e59464))
-* Added support for working with MDN features as well ([353fe28](https://github.com/wessberg/browserslist-generator/commit/353fe28))
-* Bumped deps ([35dadbd](https://github.com/wessberg/browserslist-generator/commit/35dadbd))
-* Bumped version ([fd23ee2](https://github.com/wessberg/browserslist-generator/commit/fd23ee2))
-
-
-
-## 0.0.31 (2018-06-12)
-
-* 0.0.31 ([d3498d2](https://github.com/wessberg/browserslist-generator/commit/d3498d2))
-* Bumped version ([de47080](https://github.com/wessberg/browserslist-generator/commit/de47080))
-* Updated IE xhr2 support ([b3d007e](https://github.com/wessberg/browserslist-generator/commit/b3d007e))
-
-
-
-## 0.0.30 (2018-06-07)
-
-* 0.0.30 ([fb47a3c](https://github.com/wessberg/browserslist-generator/commit/fb47a3c))
-* Bumped version ([8e0dfac](https://github.com/wessberg/browserslist-generator/commit/8e0dfac))
-* Fixed tests ([fef8c65](https://github.com/wessberg/browserslist-generator/commit/fef8c65))
-
-
-
-## 0.0.29 (2018-06-07)
-
-* 0.0.29 ([624a70b](https://github.com/wessberg/browserslist-generator/commit/624a70b))
-* Bumped version ([71c74a8](https://github.com/wessberg/browserslist-generator/commit/71c74a8))
-* Made and_ff report as desktop firefox ([f33982c](https://github.com/wessberg/browserslist-generator/commit/f33982c))
-
-
-
-## 0.0.28 (2018-06-07)
-
-* 0.0.28 ([2f9f936](https://github.com/wessberg/browserslist-generator/commit/2f9f936))
-* Bumped version ([32b7c75](https://github.com/wessberg/browserslist-generator/commit/32b7c75))
-* Made Android Chrome report as desktop chrome ([6f3c759](https://github.com/wessberg/browserslist-generator/commit/6f3c759))
-
-
-
-## 0.0.27 (2018-05-23)
-
-* 0.0.27 ([1c3c0d4](https://github.com/wessberg/browserslist-generator/commit/1c3c0d4))
-* Added a 'normalizeBrowserslist' function ([74abdd2](https://github.com/wessberg/browserslist-generator/commit/74abdd2))
-* Bumped deps ([0aef003](https://github.com/wessberg/browserslist-generator/commit/0aef003))
-* Bumped version ([528acdc](https://github.com/wessberg/browserslist-generator/commit/528acdc))
-
-
-
-## 0.0.26 (2018-05-18)
-
-* 0.0.26 ([f8e890f](https://github.com/wessberg/browserslist-generator/commit/f8e890f))
-* Bumped deps. Added Patreon to README ([1f3e277](https://github.com/wessberg/browserslist-generator/commit/1f3e277))
-* Bumped version ([0e917f4](https://github.com/wessberg/browserslist-generator/commit/0e917f4))
-
-
-
-## 0.0.25 (2018-05-08)
-
-* 0.0.25 ([ba1946d](https://github.com/wessberg/browserslist-generator/commit/ba1946d))
-* Bumped version ([76debb1](https://github.com/wessberg/browserslist-generator/commit/76debb1))
-* Fixed a bug ([97749d3](https://github.com/wessberg/browserslist-generator/commit/97749d3))
-
-
-
-## 0.0.24 (2018-05-07)
-
-* 0.0.24 ([7d2af3f](https://github.com/wessberg/browserslist-generator/commit/7d2af3f))
-* Added a nnew helper: 'userAgentSupportsFeatures' ([4cb7d8b](https://github.com/wessberg/browserslist-generator/commit/4cb7d8b))
-* Bumped version ([9f32fec](https://github.com/wessberg/browserslist-generator/commit/9f32fec))
-
-
-
-## 0.0.23 (2018-05-07)
-
-* 0.0.23 ([a04682a](https://github.com/wessberg/browserslist-generator/commit/a04682a))
-* Bumped version ([11aba67](https://github.com/wessberg/browserslist-generator/commit/11aba67))
-* Removed an unwanted console.log ([3f5323a](https://github.com/wessberg/browserslist-generator/commit/3f5323a))
-
-
-
-## 0.0.22 (2018-05-07)
-
-* 0.0.22 ([c62d2a7](https://github.com/wessberg/browserslist-generator/commit/c62d2a7))
-* BBug fixes ([72156dd](https://github.com/wessberg/browserslist-generator/commit/72156dd))
-* Bumped version ([70e686c](https://github.com/wessberg/browserslist-generator/commit/70e686c))
-* Improvements ([83c42e1](https://github.com/wessberg/browserslist-generator/commit/83c42e1))
-
-
-
-## 0.0.21 (2018-05-07)
-
-* 0.0.21 ([e344488](https://github.com/wessberg/browserslist-generator/commit/e344488))
-* Bumped version ([ec3e712](https://github.com/wessberg/browserslist-generator/commit/ec3e712))
-* Made sure to normalize the browserslists returned by 'browsersWithSupportForFeatures' and 'browsersW ([cd6809a](https://github.com/wessberg/browserslist-generator/commit/cd6809a))
-
-
-
-## 0.0.20 (2018-05-06)
-
-* 0.0.20 ([4e44851](https://github.com/wessberg/browserslist-generator/commit/4e44851))
-* Bumped version ([b80ab99](https://github.com/wessberg/browserslist-generator/commit/b80ab99))
-* Fixed a bug ([213a490](https://github.com/wessberg/browserslist-generator/commit/213a490))
-
-
-
-## 0.0.19 (2018-05-06)
-
-* 0.0.19 ([b7df01e](https://github.com/wessberg/browserslist-generator/commit/b7df01e))
-* Bumped version ([26679fc](https://github.com/wessberg/browserslist-generator/commit/26679fc))
-* Fixed a few bugs ([0f1d126](https://github.com/wessberg/browserslist-generator/commit/0f1d126))
-
-
-
-## 0.0.18 (2018-05-06)
-
-* 0.0.18 ([643f11a](https://github.com/wessberg/browserslist-generator/commit/643f11a))
-* Bumped version ([76e209b](https://github.com/wessberg/browserslist-generator/commit/76e209b))
-* Fixed a few bugs ([c19b747](https://github.com/wessberg/browserslist-generator/commit/c19b747))
-
-
-
-## 0.0.17 (2018-05-05)
-
-* 0.0.17 ([5e6dc24](https://github.com/wessberg/browserslist-generator/commit/5e6dc24))
-* Bumped version ([0178a19](https://github.com/wessberg/browserslist-generator/commit/0178a19))
-* Reffinements and testing ([0f6be0f](https://github.com/wessberg/browserslist-generator/commit/0f6be0f))
-* Removed dependency on external library and rewrote logic for matching a useragent on a browserslist ([18ae325](https://github.com/wessberg/browserslist-generator/commit/18ae325))
-
-
-
-## 0.0.16 (2018-05-05)
-
-* 0.0.16 ([237beaa](https://github.com/wessberg/browserslist-generator/commit/237beaa))
-* Bumped version ([e1e07be](https://github.com/wessberg/browserslist-generator/commit/e1e07be))
-* Updated keywords ([e7aae8a](https://github.com/wessberg/browserslist-generator/commit/e7aae8a))
-
-
-
-## 0.0.15 (2018-05-05)
-
-* 0.0.15 ([9a53ef7](https://github.com/wessberg/browserslist-generator/commit/9a53ef7))
-* Bumped version ([949a34a](https://github.com/wessberg/browserslist-generator/commit/949a34a))
-* Updated README ([6feb72d](https://github.com/wessberg/browserslist-generator/commit/6feb72d))
-
-
-
-## 0.0.14 (2018-05-05)
-
-* 0.0.14 ([87ee3fb](https://github.com/wessberg/browserslist-generator/commit/87ee3fb))
-* Bumped version ([778c6a6](https://github.com/wessberg/browserslist-generator/commit/778c6a6))
-* Updated README examples ([a44d1cb](https://github.com/wessberg/browserslist-generator/commit/a44d1cb))
-
-
-
-## 0.0.13 (2018-05-05)
-
-* 0.0.13 ([af7bbca](https://github.com/wessberg/browserslist-generator/commit/af7bbca))
-* Bumped version ([b3e5f03](https://github.com/wessberg/browserslist-generator/commit/b3e5f03))
-* Fixed a bug ([5c20350](https://github.com/wessberg/browserslist-generator/commit/5c20350))
-
-
-
-## 0.0.12 (2018-05-05)
-
-* 0.0.12 ([d7697e9](https://github.com/wessberg/browserslist-generator/commit/d7697e9))
-* Bumped version ([86fd978](https://github.com/wessberg/browserslist-generator/commit/86fd978))
-* Fixed a bug ([012c9be](https://github.com/wessberg/browserslist-generator/commit/012c9be))
-
-
-
-## 0.0.11 (2018-05-05)
-
-* 0.0.11 ([998d5a4](https://github.com/wessberg/browserslist-generator/commit/998d5a4))
-* Bug fixes and improvements ([f9540d0](https://github.com/wessberg/browserslist-generator/commit/f9540d0))
-* Bumped version ([05f1105](https://github.com/wessberg/browserslist-generator/commit/05f1105))
-
-
-
-## 0.0.10 (2018-05-05)
-
-* 0.0.10 ([7803078](https://github.com/wessberg/browserslist-generator/commit/7803078))
-* Added a 'browserslistSupportsFeatures' function that returns true if the given browserslist support ([1c13395](https://github.com/wessberg/browserslist-generator/commit/1c13395))
-* Bumped version ([2c381fe](https://github.com/wessberg/browserslist-generator/commit/2c381fe))
-
-
-
-## 0.0.9 (2018-05-05)
-
-* 0.0.9 ([8bb7932](https://github.com/wessberg/browserslist-generator/commit/8bb7932))
-* Added a function that generating a browserslist based on browsers that - doesn't - support specific ([fc8c47c](https://github.com/wessberg/browserslist-generator/commit/fc8c47c))
-* Bumped version ([b80ae05](https://github.com/wessberg/browserslist-generator/commit/b80ae05))
-
-
-
-## 0.0.8 (2018-05-05)
-
-* 0.0.8 ([d806aca](https://github.com/wessberg/browserslist-generator/commit/d806aca))
-* Bumped version ([031d80d](https://github.com/wessberg/browserslist-generator/commit/031d80d))
-* Fixed a few bugs ([adc38e5](https://github.com/wessberg/browserslist-generator/commit/adc38e5))
-
-
-
-## 0.0.7 (2018-05-01)
-
-* 0.0.7 ([69b2c46](https://github.com/wessberg/browserslist-generator/commit/69b2c46))
-* Added support for matching a browserslist query on a user agent ([69db5c0](https://github.com/wessberg/browserslist-generator/commit/69db5c0))
-* Bumped version ([fb05ae7](https://github.com/wessberg/browserslist-generator/commit/fb05ae7))
-
-
-
-## 0.0.6 (2018-04-30)
-
-* 0.0.6 ([0af214f](https://github.com/wessberg/browserslist-generator/commit/0af214f))
-* Added changelog ([1442788](https://github.com/wessberg/browserslist-generator/commit/1442788))
-* Fixed a few issues ([dcf5a88](https://github.com/wessberg/browserslist-generator/commit/dcf5a88))
-
-
-
-## 0.0.5 (2018-04-30)
-
-* 0.0.5 ([bb70540](https://github.com/wessberg/browserslist-generator/commit/bb70540))
-* Bumped version ([fab76c6](https://github.com/wessberg/browserslist-generator/commit/fab76c6))
-
-
-
-## 0.0.4 (2018-04-30)
-
-* 0.0.4 ([f4b6558](https://github.com/wessberg/browserslist-generator/commit/f4b6558))
-* First commit ([1342ad1](https://github.com/wessberg/browserslist-generator/commit/1342ad1))
-
-
-
diff --git a/README.md b/README.md
index 44c38ee..b443fa9 100644
--- a/README.md
+++ b/README.md
@@ -116,16 +116,39 @@ MIT © [Frederik Wessberg](https://github.com/wessberg)
##### `browsersWithSupportForFeatures (...features: string[]): string[]`
-Takes any amount of [caniuse](https://caniuse.com/) or [MDN](https://github.com/mdn/browser-compat-data) features and generates a browserslist that targets all browsers that support these features
+Takes any amount of [caniuse](https://caniuse.com/) or [MDN](https://github.com/mdn/browser-compat-data) features and generates a [browserslist](https://github.com/browserslist/browserslist) that targets all browsers that support these features
##### `browsersWithoutSupportForFeatures (...features: string[]): string[]`
-Takes any amount of [caniuse](https://caniuse.com/) or [MDN](https://github.com/mdn/browser-compat-data) features and generates a browserslist that targets all browsers that _doesn't_ support these features
+Takes any amount of [caniuse](https://caniuse.com/) or [MDN](https://github.com/mdn/browser-compat-data) features and generates a [browserslist](https://github.com/browserslist/browserslist) that targets all browsers that _doesn't_ support these features
+
+##### `browsersWithSupportForEcmaVersion (version: EcmaVersion): string[]`
+
+Generates a [browserslist](https://github.com/browserslist/browserslist) that targets all the browsers that support the given Ecma version.
+
+Possible Ecma versions are:
+
+- `es3`
+- `es5`
+- `es2015`
+- `es2016`
+- `es2017`
+- `es2018`
##### `browserslistSupportsFeatures (browserslist: string[], ...features: string[]): boolean`
Returns true if the given [browserslist](https://github.com/browserslist/browserslist) supports all of the given [caniuse](https://caniuse.com/) or [MDN](https://github.com/mdn/browser-compat-data) features
+##### `browserslistSupportsEcmaVersion (browserslist: string[], version: EcmaVersion): boolean`
+
+Returns true if the given [browserslist](https://github.com/browserslist/browserslist) supports the given Ecma version.
+See [this section](#browserswithsupportforecmaversion-version-ecmaversion-string) for an overview of all supported Ecma versions.
+
+##### `getAppropriateEcmaVersionForBrowserslist (browserslist: string[]): EcmaVersion`
+
+Gets the Ecma version that is most appropriate for the given [browserslist](https://github.com/browserslist/browserslist).
+See [this section](#browserswithsupportforecmaversion-version-ecmaversion-string) for an overview of all supported Ecma versions.
+
#### `matchBrowserslistOnUserAgent (userAgent: string, browserslist: string[]): boolean`
Will check if the given user agent string matches the given browserslist and return true if so.
diff --git a/package.json b/package.json
index 08a1c58..a79eb61 100644
--- a/package.json
+++ b/package.json
@@ -52,17 +52,17 @@
"@wessberg/ts-config": "0.0.30",
"ava": "^0.25.0",
"conventional-changelog-cli": "^2.0.5",
- "husky": "^1.0.0-rc.15",
+ "husky": "^1.1.1",
"tslint": "^5.11.0",
- "typescript": "^3.0.3"
+ "typescript": "^3.1.2"
},
"dependencies": {
"@types/object-path": "^0.9.29",
"@types/semver": "^5.5.0",
"@types/ua-parser-js": "^0.7.32",
- "browserslist": "^4.1.1",
- "caniuse-lite": "^1.0.30000887",
- "mdn-browser-compat-data": "0.0.51",
+ "browserslist": "^4.2.0",
+ "caniuse-lite": "^1.0.30000890",
+ "mdn-browser-compat-data": "0.0.53",
"object-path": "^0.11.4",
"semver": "^5.5.1",
"tslib": "^1.9.3",
diff --git a/src/browserslist-generator/browserslist-generator.ts b/src/browserslist-generator/browserslist-generator.ts
index 09c46cd..d60ad21 100644
--- a/src/browserslist-generator/browserslist-generator.ts
+++ b/src/browserslist-generator/browserslist-generator.ts
@@ -10,6 +10,7 @@ import {UAParser} from "ua-parser-js";
import {getLatestVersionOfBrowser, getNextVersionOfBrowser, getOldestVersionOfBrowser, getPreviousVersionOfBrowser, getSortedBrowserVersions} from "./browser-version";
import {compareVersions} from "./compare-versions";
import {ComparisonOperator} from "./comparison-operator";
+import {EcmaVersion, ES2015_FEATURES, ES2016_FEATURES, ES2017_FEATURES, ES2018_FEATURES, ES5_FEATURES} from "./ecma-version";
import {IBrowserSupportForFeaturesCommonResult} from "./i-browser-support-for-features-common-result";
import {CaniuseBrowser, CaniuseStats, CaniuseStatsNormalized, CaniuseSupportKind, ICaniuseBrowserCorrection, ICaniuseDataCorrection, ICaniuseFeature} from "./i-caniuse";
import {IMdn, MdnBrowserName} from "./i-mdn";
@@ -46,7 +47,7 @@ const userAgentWithFeaturesToSupportCache: Map = new Map();
* A Map between features and browsers that has partial support for them but should be allowed anyway
* @type {Map}
*/
-const PARTIAL_SUPPORT_ALLOWANCES =