You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

discord-emoji-convert

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-emoji-convert - npm Package Compare versions

Comparing version

to
1.3.0

100

index.js
var finalWords = "";
var finalWords = "";
function convert(phrase, counter, bigWords, textLeft){
if(textLeft != 0){
if(phrase.substring(counter-1,counter) != " ") {
character = " :regional_indicator_" + phrase.substring(counter-1,counter) + ":";
bigWords = bigWords + character;
convert(phrase, counter + 1, bigWords, textLeft - 1);
} else {
bigWords = bigWords + " ";
convert(phrase, counter + 1, bigWords, textLeft - 1);
}
function check(suffix){
switch(suffix){
case " ":
var thing = " ";
break;
case "!":
var thing = " :exclamation:";
break;
case "?":
var thing = " :question:";
break;
case "0":
var thing = " :zero:";
break;
case "1":
var thing = " :one:";
break;
case "2":
var thing = " :two:";
break;
case "3":
var thing = " :three:";
break;
case "4":
var thing = " :four:";
break;
case "5":
var thing = " :five:";
break;
case "6":
var thing = " :six:";
break;
case "7":
var thing = " :seven:";
break;
case "8":
var thing = " :eight:";
break;
case "9":
var thing = " :nine:";
break;
case "+":
var thing = " :heavy_plus_sign:";
break;
case "-":
var thing = " :heavy_minus_sign:";
break;
case "×":
var thing = " :heavy_multiplication_x:";
break;
case "*":
var thing = " :asterisk:";
break;
case "$":
var thing = " :heavy_dollar_sign:";
break;
case "÷":
var thing = " :heavy_division_sign:";
break;
}
return thing;
}
function convert(phrase, counter, bigWords, textLeft){
if(textLeft != 0){
if(phrase.substring(counter-1,counter).match(/[a-z]/i)) {
character = " :regional_indicator_" + phrase.substring(counter-1,counter) + ":";
bigWords = bigWords + character;
convert(phrase, counter + 1, bigWords, textLeft - 1);
} else {
finalWords = bigWords;
bigWords = bigWords + check(phrase.substring(counter-1,counter));
convert(phrase, counter + 1, bigWords, textLeft - 1);
}
} else {
finalWords = bigWords;
}
}
exports.bigText = function(phrase){
var counter = 1;
var bigWords = "";
var textLeft = phrase.length;
convert(phrase, counter, bigWords, textLeft);
return finalWords.toLowerCase();
}
var counter = 1;
var bigWords = "";
var textLeft = phrase.length;
convert(phrase, counter, bigWords, textLeft);
return finalWords.toLowerCase();
}
// This code may feel inefficient, bulky, and horrible all at the same time. That's ok, It serves its purpose. - Jacob Snarr

2

package.json
{
"name": "discord-emoji-convert",
"version": "1.2.7",
"version": "1.3.0",
"description": "A very simple Text to Emoji converter for Discord",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,6 +13,8 @@ [![NPM](https://nodei.co/npm/discord-emoji-convert.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/discord-emoji-convert/)

# Using Emoji Convert
Currently, in version 1.2.5, Discord Emoji convert can translate any letter in the English alphabet into a Discord Emoji. Discord Emoji Convert can also take a space and convert it to be a larger space that accomodates the large emoji letters.
To convert any string to emojis, type ```emojiConvert.bigText("insert string here")``` and the function will return your converted Discord Emoji string.
# Supported Characters
```abcdefghijklmnopqrstuvwxyz1234567890+-x*�$ ```
This includes uppercase characters since all characters are converted to lowercase in order for the Discord Emojis to work.
# Example

@@ -19,0 +21,0 @@ Inserting ```console.log(emoji.bigText("SNARR"));``` into your code, this module will output the following string: