Stringendo
JavaScript string inspector.
If you use this project don't forget to give a ⭐ star ⭐ to it on GitHub!
Usage
Functions
- stringendo()
- textCharCount()
- textHasEmoji()
- textHasNonASCII()
- textIsMultiline()
- textIsNormalized()
- textIsTrimmed()
- textLength()
- textLineCount()
- textListChars()
- textListCodes()
- textToURI()
- textToURL()
Importing
CommonJS import.
const stringendo = ;
ECMAScript Module.
;
AMD, UMD, browser script tag.
CDN (unpkg https://unpkg.com/)
Deno (Pika https://pika.dev/)
;
Examples
; const text = " good\n+$#\n日programmør 😊 ";const consolePrint = true;const inspectionAsJSON = ;
String inspection: Texts: ┌────────────┬────────────────────────────────────┐ │ │ Values │ ├────────────┼────────────────────────────────────┤ │ json │ '" good\\n+$#\\n日programmør 😊 "' │ │ lower │ ' good\n+$#\n日programmør 😊 ' │ │ normalized │ ' good\n+$#\n日programmør 😊 ' │ │ string │ ' good\n+$#\n日programmør 😊 ' │ │ upper │ ' GOOD\n+$#\n日PROGRAMMØR 😊 ' │ └────────────┴────────────────────────────────────┘ Information: ┌────────────┬────────┐ │ │ Values │ ├────────────┼────────┤ │ characters │ 24 │ │ length │ 25 │ │ lines │ 3 │ └────────────┴────────┘ Flags: ┌───────────────┬────────┐ │ │ Values │ ├───────────────┼────────┤ │ hasEmoji │ true │ │ hasNonASCII │ true │ │ isLowerCased │ true │ │ isMultiline │ true │ │ isNormalized │ true │ │ isTrimmed │ false │ │ isUpperCased │ false │ │ isUrlFriendly │ false │ └───────────────┴────────┘ URI: %20good%0A+$#%0A%E6%97%A5programm%C3%B8r%20%F0%9F%98%8A%20 URL: %20good%0A%2B%24%23%0A%E6%97%A5programm%C3%B8r%20%F0%9F%98%8A%20 Characters: [" ","g","o","o","d","\n","+","$","#","\n","日","p","r","o","g","r","a","m","m","ø","r"," ","😊"," "] Character codes: [32,103,111,111,100,10,43,36,35,10,26085,112,114,111,103,114,97,109,109,248,114,32,55357,32]