beatmath

0.4.0 • Public • Published

beatmath

module is a function that requires two arguments

  • @Number - measure length in beats
  • @Array - list of beats

It returns a function that takes one argument, a @Number, the beat count

var beatmath = require('beatmath')

var beats = beatmath(4, [1,3])
// this will return a function 
// which will return true on the 1st and 3rd
// zero indexed = false

beats(1) // true
beats(2) // false
beats(3) // true
beats(5) // true
npm install beatmath

Readme

Keywords

none

Package Sidebar

Install

npm i beatmath

Weekly Downloads

1

Version

0.4.0

License

ISC

Last publish

Collaborators

  • johnnyscript