Skip to main content
deleted 10 characters in body
Source Link
tsh
  • 35.6k
  • 2
  • 34
  • 129

JavaScript, 448440 bytes

f=a=>[..."f="+f].map(n=>({"(":(l="LEFT ")+(p="PARENTHESIS"),")":(r="RIGHT ")+p,"{":l+(c="CURLY"+(b=" BRACKET")),"}":r+c,"[":l+(q="SQUARE"+b),"]":r+q,"=":"EQUALS"+(s=" SIGN"),">":"GREATER-THAN"+s,"+":"PLUS"+s,"\\":"REVERSE SOLIDUS","\"":"QUOTATION MARK","&":"AMPERSAND",".":"FULL STOP",",":"COMMA",":":"COLON"," ":"SPACE","-":"HYPHEN-MINUS","|":"VERTICAL LINE"}[n]||n>[n]||"LATIN "+(n>{}&&"LATIN SMALL&&"SMALL"||"CAPITAL")+" LETTER "+n.toUpperCase()||"LATIN CAPITAL LETTER "+n)).join("\n")

Try it online!Try it online!

JavaScript, 448 bytes

f=a=>[..."f="+f].map(n=>({"(":(l="LEFT ")+(p="PARENTHESIS"),")":(r="RIGHT ")+p,"{":l+(c="CURLY"+(b=" BRACKET")),"}":r+c,"[":l+(q="SQUARE"+b),"]":r+q,"=":"EQUALS"+(s=" SIGN"),">":"GREATER-THAN"+s,"+":"PLUS"+s,"\\":"REVERSE SOLIDUS","\"":"QUOTATION MARK","&":"AMPERSAND",".":"FULL STOP",",":"COMMA",":":"COLON"," ":"SPACE","-":"HYPHEN-MINUS","|":"VERTICAL LINE"}[n]||n>{}&&"LATIN SMALL LETTER "+n.toUpperCase()||"LATIN CAPITAL LETTER "+n)).join("\n")

Try it online!

JavaScript, 440 bytes

f=a=>[..."f="+f].map(n=>({"(":(l="LEFT ")+(p="PARENTHESIS"),")":(r="RIGHT ")+p,"{":l+(c="CURLY"+(b=" BRACKET")),"}":r+c,"[":l+(q="SQUARE"+b),"]":r+q,"=":"EQUALS"+(s=" SIGN"),">":"GREATER-THAN"+s,"+":"PLUS"+s,"\\":"REVERSE SOLIDUS","\"":"QUOTATION MARK","&":"AMPERSAND",".":"FULL STOP",",":"COMMA",":":"COLON"," ":"SPACE","-":"HYPHEN-MINUS","|":"VERTICAL LINE"}[n]||"LATIN "+(n>{}&&"SMALL"||"CAPITAL")+" LETTER "+n.toUpperCase())).join("\n")

Try it online!

Source Link
tsh
  • 35.6k
  • 2
  • 34
  • 129

JavaScript, 448 bytes

f=a=>[..."f="+f].map(n=>({"(":(l="LEFT ")+(p="PARENTHESIS"),")":(r="RIGHT ")+p,"{":l+(c="CURLY"+(b=" BRACKET")),"}":r+c,"[":l+(q="SQUARE"+b),"]":r+q,"=":"EQUALS"+(s=" SIGN"),">":"GREATER-THAN"+s,"+":"PLUS"+s,"\\":"REVERSE SOLIDUS","\"":"QUOTATION MARK","&":"AMPERSAND",".":"FULL STOP",",":"COMMA",":":"COLON"," ":"SPACE","-":"HYPHEN-MINUS","|":"VERTICAL LINE"}[n]||n>{}&&"LATIN SMALL LETTER "+n.toUpperCase()||"LATIN CAPITAL LETTER "+n)).join("\n")

Try it online!