How to use the metal.core.isObject function in metal

To help you get started, we’ve selected a few metal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiferayCloud / marble / packages / marble-datatable / src / Datatable.js View on Github external
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;
  }
}
github LiferayCloud / marble / packages / marble-datatable / src / Datatable.js View on Github external
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;
  }
github metal / metal.js / src / Attribute.js View on Github external
shouldInformChange_(name, prevVal) {
		var info = this.attrsInfo_[name];
		return (info.state === Attribute.States.INITIALIZED) &&
			(core.isObject(prevVal) || prevVal !== this[name]);
	}
github LiferayCloud / marble / packages / marble-datatable / src / Datatable.js View on Github external
isAlreadyExpanded(data) {
    return core.isObject(data) && 'columns' in data && 'type' in data;
  }