@reldens/utils 0.17.0 → 0.17.2

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 +14 -1
  2. package/package.json +1 -1
package/lib/shortcuts.js CHANGED
@@ -53,7 +53,7 @@ class Shortcuts
53
53
  target[key] = source[key];
54
54
  continue;
55
55
  }
56
- this.mergeDeep(target[key], source[key]);
56
+ this.deepMergeProperties(target[key], source[key]);
57
57
  continue;
58
58
  }
59
59
  target[key] = source[key];
@@ -131,6 +131,19 @@ class Shortcuts
131
131
  return false;
132
132
  }
133
133
 
134
+ fetchByProperty(itemsArray, propertyName, propertyValue)
135
+ {
136
+ if(0 === itemsArray.length){
137
+ return false;
138
+ }
139
+ for(let item of itemsArray){
140
+ if(item[propertyName] === propertyValue){
141
+ return item;
142
+ }
143
+ }
144
+ return false;
145
+ }
146
+
134
147
  serializeFormData(formData)
135
148
  {
136
149
  if(0 === formData.length){
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reldens/utils",
3
3
  "scope": "@reldens",
4
- "version": "0.17.0",
4
+ "version": "0.17.2",
5
5
  "description": "Reldens - Utils",
6
6
  "author": "Damian A. Pastorini",
7
7
  "license": "MIT",