Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
visitValuesAndWrapStringValues_(value) {
let acceptArray = (val, key, reference) =>
(reference[key] = this.visitValuesAndWrapStringValues_(val));
let acceptObject = (val, key, reference) =>
(reference[key] = this.visitValuesAndWrapStringValues_(val));
this.visit_(value, acceptArray, acceptObject);
if (core.isObject(value)) {
let type = this.getValueType_(value.value);
if (type === Datatable.TYPES.STRING) {
value.value = Soy.toIncDom(value.value);
}
}
return value;
}
}
getValueType_(value) {
if (value === null) {
return Datatable.TYPES.NULL;
}
if (value === undefined) {
return Datatable.TYPES.UNDEFINED;
}
if (Array.isArray(value)) {
return Datatable.TYPES.ARRAY;
}
if (core.isObject(value) && value.contentKind === 'HTML') {
return Datatable.TYPES.STRING;
}
return typeof value;
}
shouldInformChange_(name, prevVal) {
var info = this.attrsInfo_[name];
return (info.state === Attribute.States.INITIALIZED) &&
(core.isObject(prevVal) || prevVal !== this[name]);
}
isAlreadyExpanded(data) {
return core.isObject(data) && 'columns' in data && 'type' in data;
}