The Microtext.js open source JavaScript library provides us with useful functions for working with texts. Using this library is fairly simple. It doesn’t require any other library.

The following code sample shows how simple it is to use the functions this library provides us with.

<!DOCTYPE html>
    <title>microtext.js demo</title>
    <script type="text/javascript" src="microtext.min.js"></script>
    <script type="text/javascript">
        document.writeln("<br>"+Microtext.truncate("we love programming in scala",8));

The following video clip overviews this code sample, shows its execution and explains it.

You can find more video clips, code samples and other types of training material for learning how to use this library in my free online courses website at

Leave a Reply

Your email address will not be published. Required fields are marked *