taxtank-core 0.8.0 → 0.8.1

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.
@@ -1226,9 +1226,6 @@
1226
1226
  if (items === void 0) { items = []; }
1227
1227
  return new this.constructor(items);
1228
1228
  };
1229
- Collection.prototype.getBy = function (field, value) {
1230
- return this.create(this.items.filter(function (item) { return item[field] === value; }));
1231
- };
1232
1229
  Collection.prototype.groupBy = function (path) {
1233
1230
  if (path === void 0) { path = ''; }
1234
1231
  return new CollectionDictionary(this, path);
@@ -1264,6 +1261,12 @@
1264
1261
  Collection.prototype.getIds = function () {
1265
1262
  return this.items.map(function (item) { return item['id']; });
1266
1263
  };
1264
+ Collection.prototype.getOneBy = function (path, value) {
1265
+ return this.items.find(function (item) { return get__default["default"](item, path) === value; });
1266
+ };
1267
+ Collection.prototype.getBy = function (path, value) {
1268
+ return this.create(this.items.filter(function (item) { return get__default["default"](item, path) === value; }));
1269
+ };
1267
1270
  /**
1268
1271
  * Get single item by id
1269
1272
  */