diff --git a/devnotes.txt b/devnotes.txt deleted file mode 100644 index ff0f2a7..0000000 --- a/devnotes.txt +++ /dev/null @@ -1,2 +0,0 @@ -npm install --save-dev webpack webpack-cli -npm run build \ No newline at end of file diff --git a/package.json b/package.json index f761d19..17625e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "LiteRyzJS", - "version": "0.1.0.301", + "version": "0.1.0.357", "devDependencies": { "css-loader": "^7.1.2", "sass": "^1.77.8", diff --git a/src/extensions/array.js b/src/extensions/array.js index f85a4e6..6c383dd 100644 --- a/src/extensions/array.js +++ b/src/extensions/array.js @@ -36,8 +36,40 @@ Array.prototype.addRange = function (array) { return this; }; +Array.prototype.all = function (propName, value) { + for (let i = 0; i < this.length; i++) { + if (propName == null) { + if (this[i] != value){ + return false; + } + } else { + if (typeof(this[i][propName]) != "undefined") { + if (this[i][propName] != value){ + return false; + } + } + } + } + + return true; +}; + Array.prototype.any = function (propName, value) { - return (this.count(propName, value) > 0); + for (let i = 0; i < this.length; i++) { + if (propName == null) { + if (this[i] == value){ + return true; + } + } else { + if (typeof(this[i][propName]) != "undefined") { + if (this[i][propName] == value){ + return true; + } + } + } + } + + return false; }; Array.prototype.copy = function () {