@gabrielrufino/cube 1.0.11 → 1.0.15
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/README.md +1 -1
- package/build/Array/index.js +7 -12
- package/package.json +8 -3
package/README.md
CHANGED
package/build/Array/index.js
CHANGED
|
@@ -33,11 +33,7 @@ var Array = /** @class */ (function (_super) {
|
|
|
33
33
|
return element;
|
|
34
34
|
};
|
|
35
35
|
Array.prototype.insertInFirstPosition = function (element) {
|
|
36
|
-
|
|
37
|
-
this._data[i] = this._data[i - 1];
|
|
38
|
-
}
|
|
39
|
-
this._data[0] = element;
|
|
40
|
-
return element;
|
|
36
|
+
return this.insertInPosition(0, element);
|
|
41
37
|
};
|
|
42
38
|
Array.prototype.insertInPosition = function (position, element) {
|
|
43
39
|
this._data.splice(position, 0, element);
|
|
@@ -66,13 +62,12 @@ var Array = /** @class */ (function (_super) {
|
|
|
66
62
|
return element;
|
|
67
63
|
};
|
|
68
64
|
Array.prototype[Symbol.toPrimitive] = function (type) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return null;
|
|
65
|
+
var primitives = {
|
|
66
|
+
number: this.size,
|
|
67
|
+
string: this.data.join(', '),
|
|
68
|
+
default: true,
|
|
69
|
+
};
|
|
70
|
+
return primitives[type];
|
|
76
71
|
};
|
|
77
72
|
return Array;
|
|
78
73
|
}(DataStructure_1.default));
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gabrielrufino/cube",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Data Structures and Algorithms made in Typescript",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint": "eslint src/**/*.ts",
|
|
8
8
|
"test": "jest",
|
|
9
9
|
"test:cov": "npm t -- --coverage",
|
|
10
|
+
"test:mutation": "npx stryker run",
|
|
10
11
|
"test:watch": "npm t -- --watch",
|
|
11
|
-
"build": "rimraf ./build && tsc"
|
|
12
|
+
"build": "rimraf ./build && tsc",
|
|
13
|
+
"reinstall": "rimraf node_modules && npm ci"
|
|
12
14
|
},
|
|
13
15
|
"repository": {
|
|
14
16
|
"type": "git",
|
|
@@ -27,7 +29,9 @@
|
|
|
27
29
|
"homepage": "https://github.com/gabrielrufino/cube#readme",
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@faker-js/faker": "^6.1.2",
|
|
30
|
-
"@
|
|
32
|
+
"@stryker-mutator/core": "^6.0.2",
|
|
33
|
+
"@stryker-mutator/jest-runner": "^6.0.2",
|
|
34
|
+
"@stryker-mutator/typescript-checker": "^6.0.2",
|
|
31
35
|
"@types/jest": "^27.4.1",
|
|
32
36
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
33
37
|
"@typescript-eslint/parser": "^5.13.0",
|
|
@@ -35,6 +39,7 @@
|
|
|
35
39
|
"eslint-config-xo": "^0.39.0",
|
|
36
40
|
"jest": "^27.5.1",
|
|
37
41
|
"rimraf": "^3.0.2",
|
|
42
|
+
"stryker-cli": "^1.0.2",
|
|
38
43
|
"ts-jest": "^27.1.3",
|
|
39
44
|
"ts-node": "^10.5.0",
|
|
40
45
|
"typescript": "^4.6.2"
|