Commit 7cb77760 authored by loelkes's avatar loelkes
Browse files

default values, console messages

parent acfdb851
......@@ -6,13 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.0.1] - 2019-01-11
## [1.0.2] - 2019-01-12
### Added
- Documentation
- Console message stating name and version of the module.
### Changed
- Default values for getRandomInt()
- Default values for getRandomArbitrary()
## [1.0.1] - 2019-01-11
### Changed
- Fixed format error in package.json
- Renamed arguments in getQueryVariable()
## [1.0.0] - 2019-01-11
### Added
- Inital commit
'use strict';
console.debug('zkmtools v1.0.2');
export function blink( target, interval = 50, duration = 500 ) {
var blinkTimer = setInterval( function() {
......@@ -11,13 +12,13 @@ export function blink( target, interval = 50, duration = 500 ) {
}, duration );
}
export function getRandomInt( min, max ) { // Maximum exclusive and minimum inclusive
export function getRandomInt( min=0, max=10 ) { // Maximum exclusive and minimum inclusive
min = Math.ceil( min );
max = Math.floor( max );
return Math.floor( Math.random() * ( max - min ) ) + min;
}
export function getRandomArbitrary( min, max ) {
export function getRandomArbitrary( min=0, max=1 ) {
return Math.random() * ( max - min ) + min;
}
......
{
"name": "zkmtools",
"version": "1.0.1",
"version": "1.0.2",
"description": "Useful tools for building javascript things",
"main": "index.js",
"repository": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment