Nutritious Pumpkin Mash

    words-to-time-converter
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/words-to-time-converter package

    1.1.0 • Public • Published

    words-to-time-converter

    ⏲️ Simple words to time converter with options to choose output format: minutes, seconds or hours

    NPM NPM Downloads Buy me a coffee

    Install

    npm install words-to-time-converter
    or
    yarn add words-to-time-converter

    Usage

    1. There are 3 functions to choose from by now. The speed parameter is optional. It can be 'slow', 'average' or 'fast'. If you don't write it,the default will be 'average'
    2. wordsToMinutes(text, speed)
    3. wordsToSeconds(text, speed)
    4. wordsToHours(text, speed)
    const {wordsToMinutes, wordsToHours, wordsToSeconds} = require('words-to-time-converter');
     
    //0.9 minutes
    wordsToMinutes('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'slow');
     
    //0.01 hours
    wordsToHours('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'average');
     
    //42 seconds
    wordsToSeconds('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.');
     
    //0.7 minutes
    wordsToMinutes('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.');

    Props

    Simple use, no need to do it on your own. Ideal feature to use in your blog or website.

    Contribute

    Contributions are always welcome! Please read the contribution guidelines first.

    ⭐ If you liked the library, please consider giving me a star. Thank you!

    License

    Copyright © Svetloslav Novoselski

    Install

    npm i words-to-time-converter

    DownloadsWeekly Downloads

    10

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    65 kB

    Total Files

    9

    Last publish

    Collaborators

    • svetloslav