How to use the caniuse-lite.agents function in caniuse-lite

To help you get started, we’ve selected a few caniuse-lite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github postcss / autoprefixer / test / prefixes.js View on Github external
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
        }
    }
};
github GoogleContainerTools / kpt / node_modules / autoprefixer / lib / browsers.js View on Github external
* 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 = [];
github daviddbarrero / Ionic-4-firebase / node_modules / autoprefixer / lib / browsers.js View on Github external
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;
    };
github aermin / ghChat / node_modules / autoprefixer / lib / autoprefixer.js View on Github external
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();
};
github johandb / svg-drawing-tool / node_modules / autoprefixer / lib / browsers.js View on Github external
"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 = [];
github anandthakker / doiuse / src / util.js View on Github external
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(',') + ')')
  }
}
github aermin / ghChat / node_modules / autoprefixer / lib / browsers.js View on Github external
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;
    };
github zubairghori / Ultimate_todo_list / node_modules / autoprefixer / lib / autoprefixer.js View on Github external
};

    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();
};
github jake-101 / bael-template / node_modules / autoprefixer / lib / autoprefixer.js View on Github external
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();
};
github jake-101 / bael-template / node_modules / autoprefixer / lib / browsers.js View on Github external
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;
    };

caniuse-lite

A smaller version of caniuse-db, with only the essentials!

CC-BY-4.0
Latest version published 5 days ago

Package Health Score

81 / 100
Full package analysis