@gabrielrufino/cerebrum 1.5.2 → 2.0.0
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/.github/workflows/ci.yml +3 -0
- package/README.md +4 -0
- package/dist/Math/index.js +21 -0
- package/dist/Search/index.js +18 -0
- package/dist/Sort/index.js +20 -0
- package/dist/index.js +4 -13
- package/package.json +4 -3
- package/src/Math/index.ts +5 -0
- package/src/Search/index.ts +2 -0
- package/src/Sort/index.ts +4 -0
- package/src/index.ts +3 -12
package/.github/workflows/ci.yml
CHANGED
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
# Cerebrum
|
|
2
2
|
|
|
3
|
+
[](https://github.com/gabrielrufino/cerebrum/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/gabrielrufino/cerebrum/actions/workflows/cd.yml)
|
|
5
|
+
[](https://sonarcloud.io/summary/new_code?id=gabrielrufino_cerebrum)
|
|
6
|
+
|
|
3
7
|
Algorithms made in TypeScript
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Factorial"), exports);
|
|
18
|
+
__exportStar(require("./Fibonacci"), exports);
|
|
19
|
+
__exportStar(require("./LinearRegression"), exports);
|
|
20
|
+
__exportStar(require("./SieveOfErastosthenes"), exports);
|
|
21
|
+
__exportStar(require("./TwoSum"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BinarySearch"), exports);
|
|
18
|
+
__exportStar(require("./LinearSearch"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BubbleSort"), exports);
|
|
18
|
+
__exportStar(require("./MergeSort"), exports);
|
|
19
|
+
__exportStar(require("./QuickSort"), exports);
|
|
20
|
+
__exportStar(require("./SelectionSort"), exports);
|
package/dist/index.js
CHANGED
|
@@ -15,9 +15,6 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
18
|
var __importStar = (this && this.__importStar) || (function () {
|
|
22
19
|
var ownKeys = function(o) {
|
|
23
20
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
@@ -36,14 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
33
|
};
|
|
37
34
|
})();
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.NLP = void 0;
|
|
40
|
-
|
|
41
|
-
__exportStar(require("./Math/Fibonacci"), exports);
|
|
42
|
-
__exportStar(require("./Math/LinearRegression"), exports);
|
|
43
|
-
__exportStar(require("./Math/SieveOfErastosthenes"), exports);
|
|
44
|
-
__exportStar(require("./Math/TwoSum"), exports);
|
|
36
|
+
exports.Sort = exports.Search = exports.NLP = exports.Math = void 0;
|
|
37
|
+
exports.Math = __importStar(require("./Math"));
|
|
45
38
|
exports.NLP = __importStar(require("./NLP"));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
__exportStar(require("./Sort/BubbleSort"), exports);
|
|
49
|
-
__exportStar(require("./Sort/SelectionSort"), exports);
|
|
39
|
+
exports.Search = __importStar(require("./Search"));
|
|
40
|
+
exports.Sort = __importStar(require("./Sort"));
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gabrielrufino/cerebrum",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Algorithms made in TypeScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
+
"build:watch": "npm run build -- --watch",
|
|
9
10
|
"lint": "eslint ./src/**.ts",
|
|
10
11
|
"lint:fix": "npm run lint -- --fix",
|
|
11
12
|
"test": "vitest run",
|
|
@@ -15,14 +16,14 @@
|
|
|
15
16
|
"author": "Gabriel Rufino <contato@gabrielrufino.com>",
|
|
16
17
|
"license": "UNLICENSED",
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@commitlint/cli": "^19.6.
|
|
19
|
+
"@commitlint/cli": "^19.6.1",
|
|
19
20
|
"@commitlint/config-conventional": "^19.6.0",
|
|
20
21
|
"@faker-js/faker": "^8.4.1",
|
|
21
22
|
"@gabrielrufino/eslint-config": "^1.6.0",
|
|
22
23
|
"@vitest/coverage-v8": "^2.1.8",
|
|
23
24
|
"eslint": "^8.57.1",
|
|
24
25
|
"husky": "^9.1.7",
|
|
25
|
-
"typescript": "^5.7.
|
|
26
|
+
"typescript": "^5.7.3",
|
|
26
27
|
"vitest": "^2.1.0"
|
|
27
28
|
},
|
|
28
29
|
"funding": [
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export * from './Math
|
|
2
|
-
export * from './Math/Fibonacci';
|
|
3
|
-
export * from './Math/LinearRegression';
|
|
4
|
-
export * from './Math/SieveOfErastosthenes';
|
|
5
|
-
export * from './Math/TwoSum';
|
|
6
|
-
|
|
1
|
+
export * as Math from './Math';
|
|
7
2
|
export * as NLP from './NLP';
|
|
8
|
-
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './Search/LinearSearch';
|
|
11
|
-
|
|
12
|
-
export * from './Sort/BubbleSort';
|
|
13
|
-
export * from './Sort/SelectionSort';
|
|
3
|
+
export * as Search from './Search';
|
|
4
|
+
export * as Sort from './Sort';
|