Commit aa0bda33 authored by loelkes's avatar loelkes
Browse files

documentation, fixed package.json

parent 6ac02605
......@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.0.1] - 2019-01-11
### Added
- Documentation
### Changed
- Fixed format error in package.json
- Renamed arguments in getQueryVariable()
## [1.0.0] - 2019-01-11
### Added
- Inital commit
# zkmtools
Usefull things for JavaScript.
## Documentation
### blink( target, interval, duration )
### getRandomInt( min, max )
### getRandomArbitrary( min, max )
### getMaxOfArray( numArray )
### getMinOfArray( numArray)
### getQueryVariable( variableName, fallbackValue )
### setupPointerLock( target, callback )
### FullscreenUtils()
#### Static methods
##### .toogle()
Toggle between the fullscreen mode.
##### .request()
Request the element (_document_) to go fullscreen.
##### .close()
Close the fullscreen mode.
......@@ -29,12 +29,12 @@ export function getMinOfArray( numArray ) { // Min value inside an array
return Math.min.apply( null, numArray );
}
export function getQueryVariable( variable, fallback ) {
export function getQueryVariable( variableName, fallbackValue ) {
for( let vars of window.location.search.substring( 1 ).split( '&' ) ) {
let pair = vars.split( '=' );
if( pair[ 0 ] == variable ) return pair[ 1 ];
if( pair[ 0 ] == variableName ) return pair[ 1 ];
}
return fallback;
return fallbackValue;
}
export function setupPointerLock( target, callback ) {
......
{
"name": "zkmtools",
"version": "1.0.0",
"description": "Usefull tools for building javascript things",
"version": "1.0.1",
"description": "Useful tools for building javascript things",
"main": "index.js",
"repository": {
"url": "https://hertz-gitlab.zkm.de/rapid-prototyping-lab/javascript-modules/zkmtools.git",
......@@ -11,5 +11,5 @@
"author": "Christian Lölkes",
"license": "MIT",
"dependencies": {},
"devDependencies": {},
"devDependencies": {}
}
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