@questwork/q-utilities 0.1.6 → 0.1.7
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.
- package/dist/index.min.cjs +7 -1
- package/dist/index.min.js +7 -1
- package/package.json +1 -1
package/dist/index.min.cjs
CHANGED
|
@@ -1091,7 +1091,13 @@ class Service {
|
|
|
1091
1091
|
return this.repo.init(options)
|
|
1092
1092
|
}
|
|
1093
1093
|
initFromArray(arr = []) {
|
|
1094
|
-
|
|
1094
|
+
if (Array.isArray(arr)) {
|
|
1095
|
+
return arr.map((a) => this.init(a))
|
|
1096
|
+
}
|
|
1097
|
+
return []
|
|
1098
|
+
}
|
|
1099
|
+
initOnlyValidFromArray(arr = []) {
|
|
1100
|
+
return this.initFromArray(arr).filter((i) => i)
|
|
1095
1101
|
}
|
|
1096
1102
|
|
|
1097
1103
|
async saveAll({ docs = [], systemLog } = {}) {
|
package/dist/index.min.js
CHANGED
|
@@ -1066,7 +1066,13 @@ class Service {
|
|
|
1066
1066
|
return this.repo.init(options)
|
|
1067
1067
|
}
|
|
1068
1068
|
initFromArray(arr = []) {
|
|
1069
|
-
|
|
1069
|
+
if (Array.isArray(arr)) {
|
|
1070
|
+
return arr.map((a) => this.init(a))
|
|
1071
|
+
}
|
|
1072
|
+
return []
|
|
1073
|
+
}
|
|
1074
|
+
initOnlyValidFromArray(arr = []) {
|
|
1075
|
+
return this.initFromArray(arr).filter((i) => i)
|
|
1070
1076
|
}
|
|
1071
1077
|
|
|
1072
1078
|
async saveAll({ docs = [], systemLog } = {}) {
|