<commit_before>/**
 * @module css-prefixes
 * @requires css
 * @requires css-prefixes.json
 * @requires utils
 */
var cssParser = require('css');
var cssPrefixes = rootRequire('lib/css-prefixes.json');

var utils = rootRequire("lib/checks/utils");


var self = this;

exports.name = "css-prefixes";
exports.category = "compatibility";
exports.check = function(checker, browser) {
    var missingPrefixEquivalent = {};
    var mismatchPrefixEquivalent = {};
    browser.on('har', function(har, done) {
        if (har && har.log && har.log.entries) {
            for (var i = 0; i < har.log.entries.length; i++) {
                var entry = har.log.entries[i];
                if (entry.response.status === 200) {
                    var mediaType = utils.mediaTypeName(entry.response.content
                        .mimeType);
                    if (mediaType === "text/css") {
                        var url = entry.request.url;
                        var cssObj = cssParser.parse(entry.response.content
                            .text, {<commit_msg>don't fail on unavailable css fix #50<commit_after>/**
 * @module css-prefixes
 * @requires css
 * @requires css-prefixes.json
 * @requires utils
 */
var cssParser = require('css');
var cssPrefixes = rootRequire('lib/css-prefixes.json');

var utils = rootRequire("lib/checks/utils");


var self = this;

exports.name = "css-prefixes";
exports.category = "compatibility";
exports.check = function(checker, browser) {
    var missingPrefixEquivalent = {};
    var mismatchPrefixEquivalent = {};
    browser.on('har', function(har, done) {
        if (har && har.log && har.log.entries) {
            for (var i = 0; i < har.log.entries.length; i++) {
                var entry = har.log.entries[i];
                if (entry.response.status === 200) {
                    var mediaType = utils.mediaTypeName(entry.response.content
                        .mimeType);
                    if (mediaType === "text/css") {
                        if (entry.response.content.text === undefined) {
                            // not sure why that happens
                            // but cssparser breaks on undefined
                            continue;
                        }

                        var url = entry.request.url;
                        var cssObj = cssParser.parse(entry.response.content
                            .text, {
{'fraction_non_alphanumeric': 0.12625, 'fraction_numerical': 0.004166666666666667, 'mean_word_length': 1.791860465116279, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6188708', 'n_tokens_mistral': 671, 'n_tokens_neox': 634, 'n_words': 152}