Giter Site home page Giter Site logo

beepbeep's Issues

Beep beep beep

Hey there, just a suggestion: is it possible to define beep duration? I could really use a longer beep, e.g. three longs beeps error, two short beeps = success.

Restful?

What does "Restful" mean in the context of this library?!

Console not emitting beep noise

Hi, I am working on a JS CLI app utilizing beepbeep. The problem is the beep noise is not emitting. Here is my code:

const inquirer = require('inquirer');
var beep = require('beepbeep');

var timerCommand = [
    {
      type: 'input',
      name: 'command',
      message: 'How Many Minuetes Would You Like the Timer To Run (60min MAX) ๐Ÿ“Ÿ :'
    }
  ];

class Timer {
    play(){
        inquirer.prompt(timerCommand).then(answers => {
            let timeMin = parseInt(answers.command);
            if(timeMin){
                this.startTimer(timeMin);
            }else{
                console.log("Invalid Time");
            }
        })
    }
    startTimer(duration) {
        let timeDuration = duration * 60;
        var timer = timeDuration, minutes, seconds;
        var refreshIntervalId = setInterval(function () {
            minutes = parseInt(timer / 60, 10);
            seconds = parseInt(timer % 60, 10);
    
            minutes = minutes < 10 ? "0" + minutes : minutes;
            seconds = seconds < 10 ? "0" + seconds : seconds;
    
            console.log(minutes + ":" + seconds);
    
            if (--timer < 0) {
                console.log("TIMER IS UP");
                beep(2);
                clearInterval(refreshIntervalId);
            }
        }, 1000);
    }
}

module.exports = Timer;

Add boop

Great package - I use it for most of my projects.

I would love if you could also add support for "boop"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.