add initial marp implementation with sample content and build configuration
This commit is contained in:
20
node_modules/speech-rule-engine/js/speech_rules/speech_rules.js
generated
vendored
Normal file
20
node_modules/speech-rule-engine/js/speech_rules/speech_rules.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addStore = addStore;
|
||||
exports.getStore = getStore;
|
||||
const dynamic_cstr_js_1 = require("../rule_engine/dynamic_cstr.js");
|
||||
const funcStore = new Map();
|
||||
function addStore(constr, inherit, store) {
|
||||
const values = {};
|
||||
if (inherit) {
|
||||
const inherits = funcStore.get(inherit) || {};
|
||||
Object.assign(values, inherits);
|
||||
}
|
||||
funcStore.set(constr, Object.assign(values, store));
|
||||
}
|
||||
function getStore(locale, modality, domain) {
|
||||
return (funcStore.get([locale, modality, domain].join('.')) ||
|
||||
funcStore.get([dynamic_cstr_js_1.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_js_1.Axis.LOCALE], modality, domain].join('.')) ||
|
||||
funcStore.get([dynamic_cstr_js_1.DynamicCstr.BASE_LOCALE, modality, domain].join('.')) ||
|
||||
{});
|
||||
}
|
||||
Reference in New Issue
Block a user