Skip to content

Commit

Permalink
removed unused function findIndex from utils
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Apr 22, 2015
1 parent 9158ac7 commit 93b323f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 57 deletions.
16 changes: 0 additions & 16 deletions dist/web3-light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/web3-light.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/web3-light.min.js

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions dist/web3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/web3.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/web3.min.js

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,6 @@ var padLeft = function (string, chars, sign) {
return new Array(chars - string.length + 1).join(sign ? sign : "0") + string;
};

/** Finds first index of array element matching pattern
*
* @method findIndex
* @param {Array}
* @param {Function} pattern
* @returns {Number} index of element
*/
var findIndex = function (array, callback) {
var end = false;
var i = 0;
for (; i < array.length && !end; i++) {
end = callback(array[i]);
}
return end ? i - 1 : -1;
};

/**
* Should be called to get sting from it's hex representation
*
Expand Down Expand Up @@ -464,7 +448,6 @@ var isJson = function (str) {

module.exports = {
padLeft: padLeft,
findIndex: findIndex,
toHex: toHex,
toDecimal: toDecimal,
fromDecimal: fromDecimal,
Expand Down

0 comments on commit 93b323f

Please sign in to comment.