const recordEvent = ( service, args ) => ( { type: ANALYTICS_EVENT_RECORD, meta: { analytics: [ { type: ANALYTICS_EVENT_RECORD, payload: Object.assign( {}, { service }, args ), }, ], }, } )
[types.ADS_INFO_FORMSTATE](state, formState) { state.infoFormState.edit = formState.edit; state.infoFormState.formData = Object.assign({ name: '', type: '1', height: '', comments: '', items: [], state: true, carousel: true }, formState.formData); }
[types.VERSIONMANAGE_FORMSTATE](state, config) { state.versionManage.configs = Object.assign({ title: '', description: '', version: '', versionName: '', forcibly: false, url: '' }, config) }
function buildContentTypeParser (c) { const contentTypeParser = new ContentTypeParser() contentTypeParser[kDefaultJsonParse] = c[kDefaultJsonParse] Object.assign(contentTypeParser.customParsers, c.customParsers) contentTypeParser.parserList = c.parserList.slice() return contentTypeParser }
getAmendedFormData() { const formData = this.formRef.getFormData(); delete formData.check; return Object.assign({}, formData, { field: 'title', tags: formData.tags.split(','), }); }
/** * @api {get} /api/v1/service/:service_name/device getDevicesByService * @apiName getDevicesByService * @apiGroup Device */ async function getDevicesByService(req, res) { const params = Object.assign({}, req.query, { service: req.params.service_name, }); const devices = await gladys.device.get(params); res.json(devices); }
[types.VERSIONMANAGEIOS_FORMSTATE](state, config) { state.versionManageIos.configs = Object.assign({ title: '', description: '', version: '', versionName: '', forcibly: false, url: '' }, config) }
constructor(...serviceConfig) { super(...serviceConfig); this.count = Object.assign({}, INITIAL_COUNT_VALUE); this.ready = false; this.db = this.loadDatabase(); this.emitUpdate = _.debounce(this.emitUpdate.bind(this), 100); this.countNotifications(); }
Object.assign(event, { disconnected: true, subscribe: fake.resolves(null), unsubscribe: fake.resolves(null), publish: fake.yieldsAsync(null), internalEnd: fake.resolves(null), end: () => { mqttApi.disconnected = true; mqttApi.internalEnd(); }, })
function createActions(store) { const houseActions = createActionsHouse(store); const integrationActions = createActionsIntegration(store); const actions = {}; return Object.assign({}, houseActions, integrationActions, actions); }
saveUser(user) { const mergedUser = Object.assign({}, this.user, user); this.user = mergedUser; keyValueStore.set(GATEWAY_USER_KEY, JSON.stringify(mergedUser)); }
export function runFastRules( post ) { if ( ! post ) { return post; } post = Object.assign( {}, post ); fastPostNormalizationRules( post ); return post; }
function createActions(store) { const houseActions = createActionsHouse(store); const integrationActions = createActionsIntegration(store); const actions = {}; return Object.assign({}, houseActions, integrationActions, actions); }