browserslist
Advanced tools
Comparing version 1.3.6 to 1.4.0
@@ -0,1 +1,4 @@ | ||
## 1.4 | ||
* Add `defaults` keyword. | ||
## 1.3.6 | ||
@@ -2,0 +5,0 @@ * Add `UCAndroid` alias to `and_uc` (by Evilebot Tnawi). |
25
index.js
@@ -5,2 +5,4 @@ var caniuse = require('caniuse-db/data.json').agents; | ||
var FLOAT = /^\d+(\.\d+)?$/; | ||
function uniq(array) { | ||
@@ -144,9 +146,13 @@ var filtered = []; | ||
if ( name1[0] === name2[0] ) { | ||
var d = parseFloat(name2[1]) - parseFloat(name1[1]); | ||
if ( d > 0 ) { | ||
return 1; | ||
} else if ( d < 0 ) { | ||
return -1; | ||
if ( FLOAT.test(name1[1]) && FLOAT.test(name2[1]) ) { | ||
var d = parseFloat(name2[1]) - parseFloat(name1[1]); | ||
if ( d > 0 ) { | ||
return 1; | ||
} else if ( d < 0 ) { | ||
return -1; | ||
} else { | ||
return 0; | ||
} | ||
} else { | ||
return 0; | ||
return name2[1].localeCompare(name1[1]); | ||
} | ||
@@ -459,2 +465,9 @@ } else { | ||
} | ||
}, | ||
defaults: { | ||
regexp: /^defaults$/i, | ||
select: function () { | ||
return browserslist(browserslist.defaults); | ||
} | ||
} | ||
@@ -461,0 +474,0 @@ |
{ | ||
"name": "browserslist", | ||
"version": "1.3.6", | ||
"version": "1.4.0", | ||
"description": "Get browsers versions that matches given criterias like in Autoprefixer", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
"dependencies": { | ||
"caniuse-db": "^1.0.30000525" | ||
"caniuse-db": "^1.0.30000539" | ||
}, | ||
@@ -19,3 +19,3 @@ "bin": "./cli.js", | ||
"eslint-config-postcss": "2.0.2", | ||
"eslint": "3.3.1", | ||
"eslint": "3.6.0", | ||
"ava": "0.16.0" | ||
@@ -22,0 +22,0 @@ }, |
@@ -13,4 +13,4 @@ # Browserslist [![Build Status][ci-img]][ci] | ||
browserslist('last 1 version, > 10%'); | ||
//=> ["and_chr 51", "chrome 52", "chrome 51", "edge 14", "firefox 48", | ||
// "ie 11", "ie_mob 11", "ios_saf 9.3", "opera 39", "safari 9.1"] | ||
//=> ["and_chr 51", "chrome 53", "chrome 52", "edge 14", "firefox 49", | ||
// "ie 11", "ie_mob 11", "ios_saf 10", "opera 39", "safari 10"] | ||
``` | ||
@@ -17,0 +17,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27994
499
6
Updatedcaniuse-db@^1.0.30000539