JSFiddle - React, Tailwind, and code Playground

HTML

<html>
  <script>var exports = {};</script>
  <script src="https://unpkg.com/[email protected]/dist/source.js"></script>
  
  <h1>typescript-string-operations</h1>
  <a href="https://www.npmjs.com/package/typescript-string-operations" target="_blank">NPM-Package</a>
  </h1>
</html>

TypeScript

var value = String.Format("{0:L}", "APPLE"); //output "apple"
$("html").append(value+"<br>")
 
value = String.Format("{0:U}", "apple"); // output "APPLE"
$("html").append(value+"<br>")
 
value = String.Format("{0:d}", "2017-01-23 00:00"); //output "23.01.2017"
$("html").append(value+"<br>")
 
value = String.Format("{0:s}", "21.03.2017 22:15:01") //output "2017-03-21T22:15:01"
$("html").append(value+"<br>")
 
value = String.Format("{0:n}", "1000000");
$("html").append(value+"<br>")