source/utilities/EmojiSet/EmojiSet.js
/**
 * Create one giant array of emojis from all the constructor params.
 *  @param {any[]} args
 */
Create one giant array of emojis from all the constructor params.
@param {any[]} args
Create one giant array of emojis from all the constructor params . @param { any [] } args
function flattenEmojis(args) {
  if (typeof args === "string") return args.split(" ")
  if (typeof args === "number") return [ String.fromCodePoint(args) ]
  if (isRange(args)) return rangeToCharArray.apply(null, args)
  if (Array.isArray(args)) {
    return Array.prototype.concat(...args.map(flattenEmojis))
  }
}
function flattenEmojis ( args ) { if ( typeof args === "string" ) return args . split ( " " ) if ( typeof args === "number" ) return [ String . fromCodePoint ( args ) ] if ( isRange ( args ) ) return rangeToCharArray . apply ( null , args ) if ( Array . isArray ( args ) ) { return Array . prototype . concat ( ... args . map ( flattenEmojis ) ) } }
Create one giant array of emojis from all the constructor params.
Create one giant array of emojis from all the constructor params .