Nurturing Palpable Magnificence
    Wondering what’s next for npm?Check out our public roadmap! »

    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

    Install

    npm i width-text

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    1.85 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar