static create(map) {
    let style = '';
    for (let name in map) {
      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty#Using_hasOwnProperty_as_a_property_name
      if (Object.prototype.hasOwnProperty.call(map, name)) {
        if (!/^[-_a-zA-Z0-9]+$/.test(name)) {
          throw new Error(`Name allows only [-_a-zA-Z0-9], got: ${name}`);
        }
        let value = map[name];
        if (value == null) {
          continue;
        }
        if (Array.isArray(value)) {
          value = value.map(sanitizePropertyValue).join(' ');
        } else {
          value = sanitizePropertyValue(value);
        }
        style += `${name}:${value};`;
      }
    }
    if (!style) {
      return SafeStyle.EMPTY;
    }
    return SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
  }
Creates a new SafeStyle object from the properties specified in the map.
@param {!SafeStyle.PropertyMap} map Mapping of property names to
    their values, for example {'margin': '1px'}. Names must consist of
    [-_a-zA-Z0-9]. Values might be strings consisting of
    [-,.'"%_!# a-zA-Z0-9[\]], where ", ', and [] must be properly balanced.
    We also allow simple functions like rgb() and url() which sanitizes its
    contents. Other values must be wrapped in Const. URLs might
    be passed as SafeUrl which will be wrapped into url(""). We
    also support array whose elements are joined with ' '. Null value
causes skipping the property.
@return {!SafeStyle}
@throws {!Error} If invalid name is provided.
@throws {!AssertionError} If invalid value is provided. With
    disabled assertions, invalid value is replaced by
    SafeStyle.INNOCUOUS_STRING.