eliza-core
Version:
A rendition of ELIZA program engine by Weizenbaum sharable for all javascript environments
15 lines (14 loc) • 399 B
JavaScript
export function snapshotKey(key) {
var toPrint = {};
toPrint.key = key.getKey();
toPrint.rank = key.getRank();
toPrint.decomps = (key.getDecomp() || []).map(function (d) { return snapshotDecomp(d); });
return toPrint;
}
export function snapshotDecomp(d) {
return {
pattern: d.getPattern(),
isAware: d.isMemoryKey(),
reasembs: d.getReasemb(),
};
}