1.0.0 ā€¢ Published 4 years ago

width-text v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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
```ts
const WidthText = require('width-text')

WidthText('string')
// Return: 24.453125