Sha256: 5d06826c338adfec7e7c532b5c5f16ff49559d7d4fc983fcb48198e924f3cc4c

Contents?: true

Size: 897 Bytes

Versions: 44

Compression:

Stored size: 897 Bytes

Contents

var mdnProperties = require('mdn-data/css/properties.json');
var mdnSyntaxes = require('mdn-data/css/syntaxes.json');
var patch = require('./patch.json');

function buildDictionary(dict, patchDict) {
    var result = {};

    // copy all syntaxes for an original dict
    for (var key in dict) {
        result[key] = dict[key].syntax;
    }

    // apply a patch
    for (var key in patchDict) {
        if (key in dict) {
            if (patchDict[key].syntax) {
                result[key] = patchDict[key].syntax;
            } else {
                delete result[key];
            }
        } else {
            if (patchDict[key].syntax) {
                result[key] = patchDict[key].syntax;
            }
        }
    }

    return result;
}

module.exports = {
    properties: buildDictionary(mdnProperties, patch.properties),
    types: buildDictionary(mdnSyntaxes, patch.syntaxes)
};

Version data entries

44 entries across 27 versions & 9 rubygems

Version Path
ezii-os-0.0.0.0.1 node_modules/csso/node_modules/css-tree/data/index.js
ezii-os-0.0.0.0.1 node_modules/css-tree/data/index.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/csso/node_modules/css-tree/data/index.js
locomotivecms-3.4.0 app/javascript/node_modules/csso/node_modules/css-tree/data/index.js