How to use the emojilib.fitzpatrick_scale_modifiers.indexOf 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 / search.js View on Github external
function renderResults (emojiNameArray, containerElement) {
  containerElement.innerHTML = ''
  var fragment = document.createDocumentFragment()
  var modifierValue = preference['skin-tone-modifier']
  var modifier = modifiers.indexOf(modifierValue) >= 0 ? modifierValue : null
  // console.log('display search results', emojiNameArray.length)
  emojiNameArray.forEach(function (name) {
    var unicode = addModifier(emojilib[name], modifier) || '--'
    var resultElement = document.createElement('button')
    resultElement.type = 'button'
    resultElement.className = 'emoji'
    resultElement.setAttribute('aria-label', name)
    resultElement.textContent = unicode
    fragment.appendChild(resultElement)
  })
  containerElement.appendChild(fragment)
}
github muan / mojibar / app / search.js View on Github external
function renderResults (emojiNameArray, containerElement) {
  containerElement.innerHTML = ''
  var fragment = document.createDocumentFragment()
  var modifierValue = preference['skin-tone-modifier']
  var modifier = modifiers.indexOf(modifierValue) >= 0 ? modifierValue : null
  emojiNameArray.forEach(function (name) {
    var unicode = addModifier(emojilib[name], modifier) || '--'
    var resultElement = document.createElement('button')
    resultElement.type = 'button'
    resultElement.className = 'emoji'
    resultElement.setAttribute('aria-label', name)
    resultElement.textContent = unicode
    fragment.appendChild(resultElement)
  })
  containerElement.appendChild(fragment)
}