txt-width

A lib that calculates the width of any given text, based upon specific font size and styles.

Usage no npm install needed!

<script type="module">
  import txtWidth from 'https://cdn.skypack.dev/txt-width';
</script>

README

txt-width

A lib that calculates the width of any given text, based upon specific font size and styles.

NPM version Build Status Clean Code Dependency Status devDependency Status License

Browser support

Chrome, Safari, Firefox, Opera, IE6+

Installation

    npm install txt-width

    or 

    jspm install npm:txt-width

Usage


    var txt-width = require('txt-width');

    /**
    * TODO add doc.
    */

Tests

    # TODO add test.

    npm test