Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Declaration = require('../lib/declaration');
const Prefixes = require('../lib/prefixes');
const Browsers = require('../lib/browsers');
const Supports = require('../lib/supports');
const Selector = require('../lib/selector');
const OldValue = require('../lib/old-value');
const Value = require('../lib/value');
const parse = require('postcss/lib/parse');
const data = {
browsers: require('caniuse-lite').agents,
prefixes: {
a: {
browsers: ['firefox 21', 'firefox 20 old', 'chrome 30', 'ie 6']
},
b: {
browsers: ['ie 7 new', 'firefox 20'],
mistakes: ['-webkit-'],
props: ['a', '*']
},
c: {
browsers: ['ie 7', 'firefox 20'],
selector: true
}
}
};
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
"use strict";
var browserslist = require('browserslist');
var agents = require('caniuse-lite').agents;
var utils = require('./utils');
var Browsers =
/*#__PURE__*/
function () {
/**
* Return all prefixes for default browser data
*/
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
this.prefixesCache = [];
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
var data = require('caniuse-lite').agents;
this.prefixesCache = [];
for (var name in data) {
this.prefixesCache.push('-' + data[name].prefix + '-');
}
this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) {
return b.length - a.length;
});
return this.prefixesCache;
};
plugin.info = function (opts) {
opts = opts || {};
opts.from = opts.from || process.cwd();
return require('./info')(loadPrefixes(opts));
};
return plugin;
});
/**
* Autoprefixer data
*/
module.exports.data = {
browsers: require('caniuse-lite').agents,
prefixes: require('../data/prefixes')
};
/**
* Autoprefixer default browsers
*/
module.exports.defaults = browserslist.defaults;
/**
* Inspect with default Autoprefixer
*/
module.exports.info = function () {
return module.exports().info();
};
"use strict";
var browserslist = require('browserslist');
var agents = require('caniuse-lite').agents;
var utils = require('./utils');
var Browsers =
/*#__PURE__*/
function () {
/**
* Return all prefixes for default browser data
*/
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
this.prefixesCache = [];
let agents = require('caniuse-lite').agents
module.exports = {
formatBrowserName: function (browserKey, versions) {
let browserName = (agents[browserKey] || {}).browser
if (!versions) { return browserName }
return (browserName + ' (' + versions.join(',') + ')')
}
}
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
var data = require('caniuse-lite').agents;
this.prefixesCache = [];
for (var name in data) {
this.prefixesCache.push('-' + data[name].prefix + '-');
}
this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) {
return b.length - a.length;
});
return this.prefixesCache;
};
};
plugin.options = options;
plugin.info = function (opts) {
return require('./info')(loadPrefixes(opts));
};
return plugin;
});
/**
* Autoprefixer data
*/
module.exports.data = {
browsers: require('caniuse-lite').agents,
prefixes: require('../data/prefixes')
};
/**
* Autoprefixer default browsers
*/
module.exports.defaults = browserslist.defaults;
/**
* Inspect with default Autoprefixer
*/
module.exports.info = function () {
return module.exports().info();
};
plugin.info = function (opts) {
opts = opts || {};
opts.from = opts.from || process.cwd();
return require('./info')(loadPrefixes(opts));
};
return plugin;
});
/**
* Autoprefixer data
*/
module.exports.data = {
browsers: require('caniuse-lite').agents,
prefixes: require('../data/prefixes')
};
/**
* Autoprefixer default browsers
*/
module.exports.defaults = browserslist.defaults;
/**
* Inspect with default Autoprefixer
*/
module.exports.info = function () {
return module.exports().info();
};
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
var data = require('caniuse-lite').agents;
this.prefixesCache = [];
for (var name in data) {
this.prefixesCache.push('-' + data[name].prefix + '-');
}
this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) {
return b.length - a.length;
});
return this.prefixesCache;
};