lib/translate-json-object.js
function init(options) {
		setting = options || {};

		if (!setting.googleApiKey && !setting.yandexApiKey) {
			console.warn(constant.ERROR.MISSING_TOKEN);
			return false;
		} else if (setting.yandexApiKey) {
			serviceType = constant.YANDEX_NAME;
			translateSrv = require('./service/yandex.js');
		} else {
			serviceType = constant.GOOGLE_NAME;
			translateSrv = require('./service/google.js');
		}

		translateSrv.init(setting);
		return true;
	}
function init(options) {
		setting = options || {};

		if (!setting.googleApiKey && !setting.yandexApiKey) {
			console.warn(constant.ERROR.MISSING_TOKEN);
			return false;
		} else if (setting.yandexApiKey) {
			serviceType = constant.YANDEX_NAME;
			translateSrv = require('./service/yandex.js');
		} else {
			serviceType = constant.GOOGLE_NAME;
			translateSrv = require('./service/google.js');
		}

		translateSrv.init(setting);
		return true;
	}
function init ( options ) { setting = options || { } ; if ( ! setting . googleApiKey && ! setting . yandexApiKey ) { console . warn ( constant . ERROR . MISSING_TOKEN ) ; return false ; } else if ( setting . yandexApiKey ) { serviceType = constant . YANDEX_NAME ; translateSrv = require ( './service/yandex.js' ) ; } else { serviceType = constant . GOOGLE_NAME ; translateSrv = require ( './service/google.js' ) ; } translateSrv . init ( setting ) ; return true ; }
init - Initialize the setting of your module instance, it takes a setting object

@param  {Object} options
@return {boolean} indicate if the module is configured properly
init - Initialize the setting of your module instance it takes a setting object