Skip to content

Commit

Permalink
feature(aping-helpers.js): added new helper function: getDifference()
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyTheTank committed Jan 26, 2016
1 parent 856b7a2 commit e25599b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apiNG",
"version": "1.0.8",
"version": "1.0.9",
"homepage": "https://github.com/JohnnyTheTank/apiNG",
"authors": [
"Jonathan Hornung <[email protected]>"
Expand Down
17 changes: 16 additions & 1 deletion dist/aping.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
@name: aping
@version: 1.0.8 (26-01-2016)
@version: 1.0.9 (26-01-2016)
@author: Jonathan Hornung <[email protected]>
@url: https://github.com/JohnnyTheTank/apiNG
@license: MIT
Expand Down Expand Up @@ -270,6 +270,21 @@ angular.module('jtt_aping').service('apingTimeHelper', function () {
return this.parseRequestsFromAttributes(_string, _platform, _appSettings);
};

/**
* returns the difference between two integers
*
* @param _int1 {number}
* @param _int2 {number}
* @returns {number}
*/
this.getDifference = function (_int1, _int2) {
if (_int1 > _int2) {
return _int1 - _int2;
} else {
return _int2 - _int1;
}
};

/**
* Parse JSON from Attributes and create requests
*
Expand Down
Loading

0 comments on commit e25599b

Please sign in to comment.