@ember-data/store 4.9.0-alpha.3 → 4.9.0-alpha.4
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.
|
@@ -631,12 +631,14 @@ if (DEPRECATE_ARRAY_LIKE) {
|
|
|
631
631
|
|
|
632
632
|
IdentifierArray.prototype.objectAt = function (index: number) {
|
|
633
633
|
deprecateArrayLike(this.DEPRECATED_CLASS_NAME, 'objectAt', 'at');
|
|
634
|
-
|
|
634
|
+
//For negative index values go back from the end of the array
|
|
635
|
+
let arrIndex = Math.sign(index) === -1 ? this.length + index : index;
|
|
636
|
+
return this[arrIndex];
|
|
635
637
|
};
|
|
636
638
|
|
|
637
639
|
IdentifierArray.prototype.objectsAt = function (indeces: number[]) {
|
|
638
640
|
deprecateArrayLike(this.DEPRECATED_CLASS_NAME, 'objectsAt', 'at');
|
|
639
|
-
return indeces.map((index) => this.
|
|
641
|
+
return indeces.map((index) => this.objectAt(index)!);
|
|
640
642
|
};
|
|
641
643
|
|
|
642
644
|
IdentifierArray.prototype.removeAt = function (index: number) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/store",
|
|
3
|
-
"version": "4.9.0-alpha.
|
|
3
|
+
"version": "4.9.0-alpha.4",
|
|
4
4
|
"description": "The core of EmberData. Provides the Store service which coordinates the cache with the network and presentation layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"start": "ember serve"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ember-data/canary-features": "4.9.0-alpha.
|
|
25
|
-
"@ember-data/private-build-infra": "4.9.0-alpha.
|
|
24
|
+
"@ember-data/canary-features": "4.9.0-alpha.4",
|
|
25
|
+
"@ember-data/private-build-infra": "4.9.0-alpha.4",
|
|
26
26
|
"@ember/string": "^3.0.0",
|
|
27
27
|
"@embroider/macros": "^1.8.3",
|
|
28
28
|
"@glimmer/tracking": "^1.1.2",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"ember-cli-typescript": "^5.1.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@ember-data/unpublished-test-infra": "4.9.0-alpha.
|
|
36
|
+
"@ember-data/unpublished-test-infra": "4.9.0-alpha.4",
|
|
37
37
|
"@ember/optional-features": "^2.0.0",
|
|
38
38
|
"@ember/test-helpers": "~2.7.0",
|
|
39
39
|
"@types/ember": "^4.0.1",
|