How to use the emojilib.fitzpatrick_scale_modifiers.forEach function in emojilib

To help you get started, we’ve selected a few emojilib 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 castorini / honkling / honkling-assistant / app / settings.js View on Github external
Object.keys(preferenceNames).forEach(function (key) {
      html += '<div class="pref-item">'
      if (typeof preference[key] === 'boolean') {
        html += '<label>'
        html += '<input id="' + key + '" type="checkbox">'
        html += preferenceNames[key]
        html += '</label>'
      } else if (key === 'skin-tone-modifier') {
        html += '<label for="' + key + '">'
        html += preferenceNames[key]
        html += '</label>'
        html += '<select id="' + key + '">&gt;'
        html += `<option value="">None</option>`
        modifiers.forEach(function (modifier) {
          html += `<option value="${modifier}">${modifier}</option>`
        })
        html += '</select>'
        html += ''
      } else {
        html += '<label for="' + key + '">'
        html += preferenceNames[key]
        html += '</label>'
        html += '<input placeholder="' + defaultPreference[key] + '" value="' + preference[key] + '" id="' + key + '" type="text">'
      }
      html += '</div>'
    })
    html += '<label></label><button type="submit">Save</button>'
github muan / mojibar / app / settings.js View on Github external
Object.keys(preferenceNames).forEach(function (key) {
      html += '<div class="pref-item">'
      if (typeof preference[key] === 'boolean') {
        html += '<label>'
        html += '<input id="' + key + '" type="checkbox">'
        html += preferenceNames[key]
        html += '</label>'
      } else if (key === 'skin-tone-modifier') {
        html += '<label for="' + key + '">'
        html += preferenceNames[key]
        html += '</label>'
        html += '<select id="' + key + '">&gt;'
        html += `<option value="">None</option>`
        modifiers.forEach(function (modifier) {
          html += `<option value="${modifier}">${modifier}</option>`
        })
        html += '</select>'
        html += ''
      } else {
        html += '<label for="' + key + '">'
        html += preferenceNames[key]
        html += '</label>'
        html += '<input placeholder="' + defaultPreference[key] + '" value="' + preference[key] + '" id="' + key + '" type="text">'
      }
      html += '</div>'
    })
    html += '<label></label><button type="submit">Save</button>'