How to use the yoti/src/yoti_common/constants.ATTR_FULL_NAME function in yoti

To help you get started, we’ve selected a few yoti 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 getyoti / yoti-node-sdk / examples / profile / controllers / profile.controller.js View on Github external
profile.getAttributesList().forEach((attribute) => {
    if (attribute.getName().includes(':')) {
      // Derived attributes are handled separately.
      return;
    }

    switch (attribute.getName()) {
      case constants.ATTR_SELFIE:
      case constants.ATTR_FULL_NAME:
        // Handled separately.
        break;
      case constants.ATTR_FAMILY_NAME:
        attributes.push(createAttributeItem(attribute, 'Family names', 'yoti-icon-profile'));
        break;
      case constants.ATTR_GIVEN_NAMES:
        attributes.push(createAttributeItem(attribute, 'Given names', 'yoti-icon-profile'));
        break;
      case constants.ATTR_DATE_OF_BIRTH:
        attributes.push(createAttributeItem(attribute, 'Date of birth', 'yoti-icon-calendar'));
        break;
      case constants.ATTR_GENDER:
        attributes.push(createAttributeItem(attribute, 'Gender', 'yoti-icon-gender'));
        break;
      case constants.ATTR_NATIONALITY:
        attributes.push(createAttributeItem(attribute, 'Nationality', 'yoti-icon-profile'));