mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 11:38:12 +00:00
removed unused function findIndex from utils
This commit is contained in:
parent
9158ac760d
commit
93b323f176
16
dist/web3-light.js
vendored
16
dist/web3-light.js
vendored
@ -953,22 +953,6 @@ var padLeft = function (string, chars, sign) {
|
|||||||
return new Array(chars - string.length + 1).join(sign ? sign : "0") + string;
|
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
|
* Should be called to get sting from it's hex representation
|
||||||
*
|
*
|
||||||
|
4
dist/web3-light.js.map
vendored
4
dist/web3-light.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/web3-light.min.js
vendored
4
dist/web3-light.min.js
vendored
File diff suppressed because one or more lines are too long
16
dist/web3.js
vendored
16
dist/web3.js
vendored
@ -953,22 +953,6 @@ var padLeft = function (string, chars, sign) {
|
|||||||
return new Array(chars - string.length + 1).join(sign ? sign : "0") + string;
|
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
|
* Should be called to get sting from it's hex representation
|
||||||
*
|
*
|
||||||
|
4
dist/web3.js.map
vendored
4
dist/web3.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/web3.min.js
vendored
4
dist/web3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -67,22 +67,6 @@ var padLeft = function (string, chars, sign) {
|
|||||||
return new Array(chars - string.length + 1).join(sign ? sign : "0") + string;
|
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
|
* Should be called to get sting from it's hex representation
|
||||||
*
|
*
|
||||||
@ -464,7 +448,6 @@ var isJson = function (str) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
padLeft: padLeft,
|
padLeft: padLeft,
|
||||||
findIndex: findIndex,
|
|
||||||
toHex: toHex,
|
toHex: toHex,
|
||||||
toDecimal: toDecimal,
|
toDecimal: toDecimal,
|
||||||
fromDecimal: fromDecimal,
|
fromDecimal: fromDecimal,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user