width-text

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i width-text

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.85 kB

Total Files

4

Last publish

Collaborators

  • yonicb