All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.cldrjs.src.core.set_available_bundles.js Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
define([
    "../resource/get"
], function (resourceGet) {

    /**
     * setAvailableBundles( Cldr, json )
     *
     * @Cldr [Cldr class]
     *
     * @json resolved/unresolved cldr data.
     *
     * Set available bundles queue based on passed json CLDR data. Considers a bundle as any String at /main/{bundle}.
     */
    return function (Cldr, json) {
        var bundle,
            availableBundleMapQueue = Cldr._availableBundleMapQueue,
            main = resourceGet(json, ["main"]);

        if (main) {
            for (bundle in main) {
                if (main.hasOwnProperty(bundle) && bundle !== "root" &&
                    availableBundleMapQueue.indexOf(bundle) === -1) {
                    availableBundleMapQueue.push(bundle);
                }
            }
        }
    };
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy