@vorplex/core 0.0.9 → 0.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.
@@ -0,0 +1,7 @@
1
+ export type Result<TValue, TFailure extends {
2
+ reason: string;
3
+ }> = [null, TValue] | [TFailure, TValue];
4
+ export declare function ok<T>(value: T): Result<T, null>;
5
+ export declare function fail<TReason extends string, T extends {
6
+ reason: TReason;
7
+ }>(error: T): Result<null, T>;
@@ -0,0 +1,6 @@
1
+ export function ok(value) {
2
+ return [null, value];
3
+ }
4
+ export function fail(error) {
5
+ return [error, null];
6
+ }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './consts/mime-type.const';
2
2
  export * from './consts/unit.const';
3
3
  export * from './functions/debounce.function';
4
4
  export * from './functions/is-node-environment.function';
5
+ export * from './functions/ok.function';
5
6
  export * from './functions/parse-path-selector.function';
6
7
  export * from './functions/parse-url.function';
7
8
  export * from './interfaces/group.interface';
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ export * from './consts/mime-type.const';
3
3
  export * from './consts/unit.const';
4
4
  export * from './functions/debounce.function';
5
5
  export * from './functions/is-node-environment.function';
6
+ export * from './functions/ok.function';
6
7
  export * from './functions/parse-path-selector.function';
7
8
  export * from './functions/parse-url.function';
8
9
  export * from './interfaces/group.interface';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorplex/core",
3
- "version": "0.0.9",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -15,12 +15,12 @@
15
15
  "types": "./dist/index.d.ts",
16
16
  "main": "./dist/index.js",
17
17
  "dependencies": {
18
- "tslib": "^2.8.1"
18
+ "tslib": "2.8.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/jest": "^29.5.2",
22
- "jest": "^29.5.0",
23
- "ts-jest": "^29.1.0"
21
+ "@types/jest": "29.5.14",
22
+ "jest": "29.7.0",
23
+ "ts-jest": "29.4.5"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsc -b --force tsconfig.build.json",