MCPcopy Index your code
hub / github.com/feiyu563/PrometheusAlert / getSetGlobalLocale

Function getSetGlobalLocale

static/plugins/chart.js/Chart.bundle.js:16571–16594  ·  view source on GitHub ↗
(key, values)

Source from the content-addressed store, hash-verified

16569 // no arguments are passed in, it will simply return the current global
16570 // locale key.
16571 function getSetGlobalLocale (key, values) {
16572 var data;
16573 if (key) {
16574 if (isUndefined(values)) {
16575 data = getLocale(key);
16576 }
16577 else {
16578 data = defineLocale(key, values);
16579 }
16580
16581 if (data) {
16582 // moment.duration._locale = moment._locale = data;
16583 globalLocale = data;
16584 }
16585 else {
16586 if ((typeof console !== 'undefined') && console.warn) {
16587 //warn user if arguments are passed but the locale could not be set
16588 console.warn('Locale ' + key + ' not found. Did you forget to load it?');
16589 }
16590 }
16591 }
16592
16593 return globalLocale._abbr;
16594 }
16595
16596 function defineLocale (name, config) {
16597 if (config !== null) {

Callers 4

loadLocaleFunction · 0.85
defineLocaleFunction · 0.85
updateLocaleFunction · 0.85
Chart.bundle.jsFile · 0.85

Calls 3

getLocaleFunction · 0.85
defineLocaleFunction · 0.85
isUndefinedFunction · 0.70

Tested by

no test coverage detected