Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dijs/fizzbuzz
https://github.com/dijs/fizzbuzz
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dijs/fizzbuzz
- Owner: dijs
- Created: 2014-12-24T00:50:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-24T00:51:04.000Z (about 10 years ago)
- Last Synced: 2024-11-11T04:51:40.712Z (2 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FizzBuzz
### Installation
Clone repository and run npm install
### Testing
Run npm test
### Usage
The fizzbuzz method iterates from 1 to the given upper bound and fires the given callback with each number and divisor result.
```
var fizzbuzz = require('/path/to/fizzbuzz/index.js');// fizzbuzz(Upper Bound , Divisor Word Pairs, Result Callback Function)
// Example:
fizzbuzz(100, [{
divisor: 3,
word: 'fizz'
}, {
divisor: 5,
word: 'buzz'
}], function(n, result){
// Do stuff...
});```