miolo-model 3.0.0-beta.172 → 3.0.0-beta.173

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miolo-model",
3
- "version": "3.0.0-beta.172",
3
+ "version": "3.0.0-beta.173",
4
4
  "description": "Data models for miolo world",
5
5
  "author": "Donato Lorenzo <donato@afialapis.com>",
6
6
  "contributors": [
@@ -33,7 +33,9 @@ export default class MioloArray extends CacheMixin(Array) {
33
33
  return [...this].map((i) => i.get_data())
34
34
  }
35
35
 
36
- getData = this.get_data
36
+ getData() {
37
+ return this.get_data()
38
+ }
37
39
 
38
40
  find_index_by_field(field, value) {
39
41
  if (this.length >= 0) {
@@ -48,7 +50,9 @@ export default class MioloArray extends CacheMixin(Array) {
48
50
  return -1
49
51
  }
50
52
 
51
- findIndexByField = this.find_index_by_field
53
+ findIndexByField(field, value) {
54
+ return this.find_index_by_field(field, value)
55
+ }
52
56
 
53
57
  find_by_field(field, value) {
54
58
  if (this.length >= 0) {
@@ -63,13 +67,17 @@ export default class MioloArray extends CacheMixin(Array) {
63
67
  return undefined
64
68
  }
65
69
 
66
- findByField = this.find_by_field
70
+ findByField(field, value) {
71
+ return this.find_by_field(field, value)
72
+ }
67
73
 
68
74
  find_by_id(id) {
69
75
  return this.find_by_field("id", id)
70
76
  }
71
77
 
72
- findById = this.find_by_id
78
+ findById(id) {
79
+ return this.find_by_id(id)
80
+ }
73
81
 
74
82
  remove_by_field(field, value) {
75
83
  const fidx = this.find_index_by_field(field, value)
@@ -78,7 +86,9 @@ export default class MioloArray extends CacheMixin(Array) {
78
86
  }
79
87
  }
80
88
 
81
- removeByField = this.remove_by_field
89
+ removeByField(field, value) {
90
+ return this.remove_by_field(field, value)
91
+ }
82
92
 
83
93
  push(data) {
84
94
  const item =
@@ -36,7 +36,9 @@ export default class MioloModel extends CacheMixin() {
36
36
  return data
37
37
  }
38
38
 
39
- getExtraData = this.get_extra_data
39
+ getExtraData() {
40
+ return this.get_extra_data()
41
+ }
40
42
 
41
43
  get_data() {
42
44
  const extra = this.get_extra_data() || {}
@@ -46,7 +48,9 @@ export default class MioloModel extends CacheMixin() {
46
48
  }
47
49
  }
48
50
 
49
- getData = this.get_data
51
+ getData() {
52
+ return this.get_data()
53
+ }
50
54
 
51
55
  update(changes) {
52
56
  if (this.data === undefined) {