iOS Safari 10 minor version queries not recognised

node v14.20.1
version: 3.0.0
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
require("browserslist"); const { matchesUA } = require('browserslist-useragent'); // user agent strings const UA_ios_saf_10_1 = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1'; const UA_ios_saf_10_3_1 = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E8301 Safari/602.1'; const UA_ios_saf_10_3_4 = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_4 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G61 Safari/602.1'; // returns `true` for all except `ios_saf >= 10.1` console.log( '10_1 >= 10.1: ' + matchesUA(UA_ios_saf_10_1, { browsers: ['ios_saf >= 10.1'] }), '10_3_1 >= 10.1: ' + matchesUA(UA_ios_saf_10_3_1, { browsers: ['ios_saf >= 10.1'] }), '10_3_1 >= 10.2: ' + matchesUA(UA_ios_saf_10_3_1, { browsers: ['ios_saf >= 10.2'] }), '10_3_1 >= 10.3: ' + matchesUA(UA_ios_saf_10_3_1, { browsers: ['ios_saf >= 10.3'] }), '10_3_4 >= 10.1: ' + matchesUA(UA_ios_saf_10_3_4, { browsers: ['ios_saf >= 10.1'] }), '10_3_4 >= 10.2: ' + matchesUA(UA_ios_saf_10_3_4, { browsers: ['ios_saf >= 10.2'] }), '10_3_4 >= 10.3: ' + matchesUA(UA_ios_saf_10_3_4, { browsers: ['ios_saf >= 10.3'] }), );
Loading…

no comments

    sign in to comment