stuff
This commit is contained in:
parent
bc92231240
commit
b8225c639e
11904 changed files with 1472749 additions and 133 deletions
16
node_modules/speech-rule-engine/mjs/speech_rules/speech_rules.js
generated
vendored
Normal file
16
node_modules/speech-rule-engine/mjs/speech_rules/speech_rules.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { Axis, DynamicCstr } from '../rule_engine/dynamic_cstr.js';
|
||||
const funcStore = new Map();
|
||||
export 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));
|
||||
}
|
||||
export function getStore(locale, modality, domain) {
|
||||
return (funcStore.get([locale, modality, domain].join('.')) ||
|
||||
funcStore.get([DynamicCstr.DEFAULT_VALUES[Axis.LOCALE], modality, domain].join('.')) ||
|
||||
funcStore.get([DynamicCstr.BASE_LOCALE, modality, domain].join('.')) ||
|
||||
{});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue