UNPKG

sbis3-node-ws

Version:

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

26 lines 747 B
define('js!Core/tmpl/js/helpers/scopes', function () { 'use strict'; /** * Scopes handling functions, tag.prefix */ var rootScopeName = '__rootScope'; var scopes = { createScope: function createScope(scope) { var createdScope = {}; createdScope[rootScopeName] = scope; return createdScope; }, executeScope: function executeScope(identifier, scope) { var rootScope = rootScopeName; if (scope.hasOwnProperty(identifier)) { return scope; } else { if (scope.hasOwnProperty(rootScope)) { return executeScope(identifier, scope[rootScope]); } } return scope; } } return scopes; });