width-text
v1.0.0
Published
๐ A small utility to measure the width of the text or string in browsers that support the canvas API. ๐
Downloads
4
Readme
Width Text
๐ A small utility to measure the width of the text or string in browsers that support the canvas API. ๐
Installation
// Using Npm
npm i width-text
// Using Yarn
yarn add width-text
Usage
For Typescript
import WidthText from 'width-text'
WidthText('string')
// Return: 24.453125
For Javascript or Nodejs
const WidthText = require('width-text')
WidthText('string')
// Return: 24.453125