@reldens/utils 0.17.4 → 0.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/shortcuts.js +17 -0
  2. package/package.json +1 -1
package/lib/shortcuts.js CHANGED
@@ -147,6 +147,23 @@ class Shortcuts
147
147
  return false;
148
148
  }
149
149
 
150
+ fetchAllByProperty(itemsArray, propertyName, propertyValue)
151
+ {
152
+ if(!this.isArray(itemsArray)){
153
+ return [];
154
+ }
155
+ if(0 === itemsArray.length){
156
+ return [];
157
+ }
158
+ let foundItems = [];
159
+ for(let item of itemsArray){
160
+ if(item[propertyName] === propertyValue){
161
+ foundItems.push(item);
162
+ }
163
+ }
164
+ return foundItems;
165
+ }
166
+
150
167
  fetchByPropertyOnObject(objectList, propertyName, propertyValue)
151
168
  {
152
169
  if(!objectList){
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reldens/utils",
3
3
  "scope": "@reldens",
4
- "version": "0.17.4",
4
+ "version": "0.17.5",
5
5
  "description": "Reldens - Utils",
6
6
  "author": "Damian A. Pastorini",
7
7
  "license": "MIT",