Esempio n. 1
0
  /*
   * Transform the files
   */
  function transform(file, encoding, cb) {
    if (file.isNull()) {
      return cb();
    }
    if (file.isStream()) {
      return cb(new gutil.PluginError(pluginName, 'Streaming not supported'));
    }

    let kind = detectKind(path.extname(file.path));
    if (kind === null) {
      return cb();
    }

    let componentName = gutil.replaceExtension(file.relative, '.vue');
    if (!components.has(componentName)) {
      components.set(componentName, new Map());
    }
    components.get(componentName).set(kind, file.contents.toString(encoding));

    return cb();
  }
Esempio n. 2
0
function getBindings(object) {
    if (!bindingsForObject.has(object)) {
        bindingsForObject.set(object, {});
    }
    return bindingsForObject.get(object);
}
Esempio n. 3
0
'use strict';
var countryCodes = require('./countryCodes.json'), Map = require("collections/map");
var countryCodesMap = new Map();

for ( var i = 0, len = countryCodes.length; i < len; i++) {
	var country = countryCodes[i];
	countryCodesMap.set(country.countryName.toLowerCase(), country);
	countryCodesMap.set(country.iso2.toLowerCase(), country);
	countryCodesMap.set(country.iso3.toLowerCase(), country);

	if (country.phoneCode)// because some territories are landless and no phones exist there :-)
		countryCodesMap.set(country.phoneCode.toLowerCase(), country);

	countryCodesMap.set(country, country);
}

var CountryCodes = function() {

};

CountryCodes.getAll = function() {
	return countryCodes;
};

CountryCodes.getCountry = function(param) {
	return (param)?countryCodesMap.get(param.toLowerCase()):undefined;
};

CountryCodes.getISO2 = function(param) {
	if(!param)
		return undefined;
 // add Event
 addRelay(incomingEvent, outgoingEvent) {
   this.relayMap.set(incomingEvent, outgoingEvent);
   this.incommingOrder(incomingEvent);
   return this;
 }