UNPKG

sbis3-node-ws

Version:

Модуль позволяет использовать ядро интерфейсного фреймворка sbis3-ws(`core.js`) и модуль работы с данными (`Source.js`) в приложении на nodejs.

24 lines 1.06 kB
define('js!Core/tmpl/js/helpers/challengeModuleValues', ['js!Core/tmpl/js/helpers/processExpressions', 'js!Core/tmpl/js/helpers/errorHandling'], function (processExpressions, errorHandling) { /** * Retrieving value from tag constructions */ return function challenge(tag, property, isText, data) { var source; try { if (tag.attribs.hasOwnProperty(property)) { source = { fromAttr: true, value: isText ? tag.attribs[property].data.value.trim() : processExpressions(tag.attribs[property].data[0], data, this.calculators, this.filename) }; } else { source = { fromAttr: false, value: isText ? tag.attribs.data.data.value.trim() : processExpressions(tag.attribs.data.data[0], data, this.calculators, this.filename) }; } } catch (err) { errorHandling('There is no data for "' + property + '" module to use. Tag: <' + tag.raw + '>', this.filename); } return source; }; });