zerosurge 13.1.0 → 15.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/README.md +3 -6
- package/index.test.js +5 -2
- package/package.json +17 -30
- package/src/index.d.ts +13 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +65 -0
- package/src/index.js.map +1 -0
- package/src/index.ts +67 -0
- package/src/types/betterloggingwithecho.d.ts +23 -0
- package/src/types/minecraft-seed-input.d.ts +11 -0
- package/src/types/string-creashaks-organzine.d.ts +9 -0
- package/tsconfig.json +45 -0
- package/LICENSE +0 -75
- /package/{index.js → old.js} +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<sup><sub><i>(i apologize for the terrible logo.)</i></sub></sup>
|
|
5
5
|
|
|
6
|
-
> The
|
|
6
|
+
> The best zero utility library on the internet.
|
|
7
7
|
|
|
8
8
|
Tired of painstakingly trying to find the character 0 on your keyboard and then pushing the button, or don't remember how to use the number zero in JavaScript? Well, this library is the new way to zero. ZeroSurge.js is the future!
|
|
9
9
|
|
|
@@ -34,6 +34,7 @@ $ pnpm add zerosurge
|
|
|
34
34
|
This enum defines the calculation methods available for the `returnZero` function in the library:
|
|
35
35
|
- **CreashaksOrganzine**: Method 1 for zero calculation. This uses the string "creashaks organzine" and uses the Minecraft seed input algorithm to make the number zero from it.
|
|
36
36
|
- **NumberPrototypeValue**: Method 2 for zero calculation. This uses the `Number` class prototype to return zero.
|
|
37
|
+
- **RandomNumberSelfSubtraction**: Method 3 for zero calculation. This subtracts a random number by itself.
|
|
37
38
|
|
|
38
39
|
### Functions
|
|
39
40
|
|
|
@@ -78,8 +79,4 @@ When `loggingEnabled` is set to `true`, the library will log relevant messages t
|
|
|
78
79
|
## Contributing
|
|
79
80
|
Contributions welcome. You can contribute by opening a pull request or issue at our github repository.
|
|
80
81
|
|
|
81
|
-
##
|
|
82
|
-
Zerosurge is licensed under the 10xGPWTHPL License. See the [LICENSE](LICENSE) file for more details.
|
|
83
|
-
|
|
84
|
-
## made with HEAVY BLACK HEART U+2764 ❤❤❤❤
|
|
85
|
-
## 10xGPWTHPL Licensed
|
|
82
|
+
## made with HEAVY BLACK HEART U+2764 ❤❤❤❤
|
package/index.test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { ZeroCalculationMethod, isZero, returnZero } = require("
|
|
1
|
+
const { ZeroCalculationMethod, isZero, returnZero } = require("./src/index")
|
|
2
2
|
const kleur = require("kleur")
|
|
3
3
|
const attempt = require("attempt-statement")
|
|
4
4
|
const assert = require("assert-fn")
|
|
@@ -9,7 +9,6 @@ const { immediateError, ErrorType } = require('immediate-error')
|
|
|
9
9
|
const loggingEnabled = false
|
|
10
10
|
|
|
11
11
|
attempt(() => {
|
|
12
|
-
assert(returnZero() === 0, "returnZero should return zero")
|
|
13
12
|
assert(
|
|
14
13
|
returnZero({ method: ZeroCalculationMethod.CreashaksOrganzine, loggingEnabled }) === 0,
|
|
15
14
|
"returnZero should return zero with creashaks organzine method"
|
|
@@ -18,6 +17,10 @@ attempt(() => {
|
|
|
18
17
|
returnZero({ method: ZeroCalculationMethod.NumberPrototypeValue, loggingEnabled }) === 0,
|
|
19
18
|
"returnZero should return zero with number prototype value method"
|
|
20
19
|
)
|
|
20
|
+
assert(
|
|
21
|
+
returnZero({ method: ZeroCalculationMethod.RandomNumberSelfSubtraction, loggingEnabled }) === 0,
|
|
22
|
+
"returnZero should return zero with number prototype value method"
|
|
23
|
+
)
|
|
21
24
|
assert(isZero(0, loggingEnabled) === true, "isZero should return true if the input is zero")
|
|
22
25
|
assert(isZero((Math.random() + 0.1) * 134, loggingEnabled) === false, "isZero should return false if the input is not zero")
|
|
23
26
|
}).rescue((e) => {
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zerosurge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "The future is here.",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "node index.test"
|
|
7
|
+
"test": "node index.test",
|
|
8
|
+
"build": "tsc"
|
|
8
9
|
},
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
@@ -108,42 +109,28 @@
|
|
|
108
109
|
"95-keywords-is-alot"
|
|
109
110
|
],
|
|
110
111
|
"author": "tj-commits <thefoxjones@gmail.com>",
|
|
111
|
-
"license": "
|
|
112
|
+
"license": "MIT",
|
|
112
113
|
"bugs": {
|
|
113
114
|
"url": "https://github.com/10xEngineersQualityProgramming/ZeroSurge.js/issues"
|
|
114
115
|
},
|
|
115
116
|
"homepage": "https://github.com/10xEngineersQualityProgramming/ZeroSurge.js#readme",
|
|
116
117
|
"dependencies": {
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
118
|
+
"betterloggingwithecho": "^1.0.0",
|
|
119
|
+
"chalk": "^4.1.2",
|
|
120
|
+
"immediate-error": "^6.2.0",
|
|
121
|
+
"minecraft-seed-input": "^1.0.0",
|
|
122
|
+
"random-number": "^0.0.9",
|
|
123
|
+
"string-creashaks-organzine": "^1.0.0"
|
|
124
|
+
},
|
|
125
|
+
"devDependencies": {
|
|
126
|
+
"@types/get-intrinsic": "^1.2.3",
|
|
127
|
+
"@types/node": "^24.10.0",
|
|
128
|
+
"@types/random-number": "^0.0.4",
|
|
120
129
|
"assert-fn": "^1.0.1",
|
|
121
130
|
"attempt-statement": "^1.1.0",
|
|
122
|
-
"deep-equal": "^2.2.3",
|
|
123
|
-
"exit": "^0.1.2",
|
|
124
|
-
"falsejs": "^1234.56.789",
|
|
125
|
-
"get-ecmascript-type-of": "^1.0.0",
|
|
126
|
-
"get-intrinsic": "^1.2.4",
|
|
127
|
-
"if": "^2.0.0",
|
|
128
|
-
"immediate-error": "^6.1.0",
|
|
129
|
-
"integer-value-positive-one": "^1.0.2",
|
|
130
|
-
"integer-value-positive-two": "^1.0.0",
|
|
131
|
-
"is-eq-ten-thousand": "^4324803849.34298304823.328712760",
|
|
132
|
-
"is-equal": "^1.7.0",
|
|
133
|
-
"is-equal-to": "^1.1.2",
|
|
134
|
-
"is-hundred": "^0.10.0",
|
|
135
|
-
"is-hundred-thousand": "^10000000000000.10000000000000.10000000000000",
|
|
136
|
-
"is-nil": "^1.0.1",
|
|
137
|
-
"is-one": "^1.0.0",
|
|
138
|
-
"is-ten": "^0.1.0",
|
|
139
|
-
"is-thousand": "^0.0.2",
|
|
140
|
-
"is-uneven": "^1.0.0",
|
|
141
131
|
"kleur": "^4.1.5",
|
|
142
|
-
"lodash.sample": "^4.2.1",
|
|
143
132
|
"logtoconsole": "^1.0.7",
|
|
144
|
-
"minecraft-seed-input": "^1.0.0",
|
|
145
|
-
"none": "^1.0.0",
|
|
146
133
|
"noop10": "^1.0.3",
|
|
147
|
-
"
|
|
134
|
+
"typescript": "^5.9.3"
|
|
148
135
|
}
|
|
149
136
|
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum ZeroCalculationMethod {
|
|
2
|
+
CreashaksOrganzine = 0,
|
|
3
|
+
NumberPrototypeValue = 1,
|
|
4
|
+
RandomNumberSelfSubtraction = 2
|
|
5
|
+
}
|
|
6
|
+
type ReturnZeroOptions = {
|
|
7
|
+
method: ZeroCalculationMethod;
|
|
8
|
+
loggingEnabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function returnZero(options: ReturnZeroOptions): 0 | undefined;
|
|
11
|
+
export declare function isZero(value: any): boolean;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAOA,oBAAY,qBAAqB;IAC/B,kBAAkB,IAAA;IAClB,oBAAoB,IAAA;IACpB,2BAA2B,IAAA;CAC5B;AAeD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AACD,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,CAAC,GAAG,SAAS,CA+BpE;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAG1C"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ZeroCalculationMethod = void 0;
|
|
7
|
+
exports.returnZero = returnZero;
|
|
8
|
+
exports.isZero = isZero;
|
|
9
|
+
const betterloggingwithecho_1 = __importDefault(require("betterloggingwithecho"));
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
11
|
+
const minecraft_seed_input_1 = __importDefault(require("minecraft-seed-input"));
|
|
12
|
+
const string_creashaks_organzine_1 = __importDefault(require("string-creashaks-organzine"));
|
|
13
|
+
const immediate_error_1 = require("immediate-error");
|
|
14
|
+
const random_number_1 = __importDefault(require("random-number"));
|
|
15
|
+
var ZeroCalculationMethod;
|
|
16
|
+
(function (ZeroCalculationMethod) {
|
|
17
|
+
ZeroCalculationMethod[ZeroCalculationMethod["CreashaksOrganzine"] = 0] = "CreashaksOrganzine";
|
|
18
|
+
ZeroCalculationMethod[ZeroCalculationMethod["NumberPrototypeValue"] = 1] = "NumberPrototypeValue";
|
|
19
|
+
ZeroCalculationMethod[ZeroCalculationMethod["RandomNumberSelfSubtraction"] = 2] = "RandomNumberSelfSubtraction";
|
|
20
|
+
})(ZeroCalculationMethod || (exports.ZeroCalculationMethod = ZeroCalculationMethod = {}));
|
|
21
|
+
class Logger {
|
|
22
|
+
constructor(loggingEnabled) {
|
|
23
|
+
this.loggingEnabled = loggingEnabled;
|
|
24
|
+
}
|
|
25
|
+
log(message) {
|
|
26
|
+
if (this.loggingEnabled) {
|
|
27
|
+
(0, betterloggingwithecho_1.default)(message);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function returnZero(options) {
|
|
32
|
+
const logger = new Logger(options.loggingEnabled);
|
|
33
|
+
const method = options.method;
|
|
34
|
+
logger.log(chalk_1.default.cyan("[zerosurge] Beginning to calculate zero"));
|
|
35
|
+
switch (method) {
|
|
36
|
+
case ZeroCalculationMethod.CreashaksOrganzine: {
|
|
37
|
+
logger.log(chalk_1.default.cyan("[zerosurge] Using CreashaksOrganzine method"));
|
|
38
|
+
const result = (0, minecraft_seed_input_1.default)(string_creashaks_organzine_1.default);
|
|
39
|
+
logger.log(chalk_1.default.green("[zerosurge] Zero calculated succesfully"));
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
case ZeroCalculationMethod.NumberPrototypeValue: {
|
|
43
|
+
logger.log(chalk_1.default.cyan("[zerosurge] Using NumberPrototypeValue method"));
|
|
44
|
+
const result = Number.prototype.valueOf();
|
|
45
|
+
logger.log(chalk_1.default.green("[zerosurge] Zero calculated succesfully"));
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
case ZeroCalculationMethod.RandomNumberSelfSubtraction: {
|
|
49
|
+
logger.log(chalk_1.default.cyan("[zerosurge] Using RandomNumberSelfSubtraction"));
|
|
50
|
+
const random = (0, random_number_1.default)();
|
|
51
|
+
logger.log(chalk_1.default.cyan("[zerosurge] Generated random number " + random));
|
|
52
|
+
const result = random - random;
|
|
53
|
+
logger.log(chalk_1.default.green("[zerosurge] Zero calculated succesfully"));
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
default: {
|
|
57
|
+
(0, immediate_error_1.immediateError)(chalk_1.default.red("[zerosurge] Unknown or undefined method for calculating zero, exiting"), immediate_error_1.ErrorType.TypeError);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function isZero(value) {
|
|
62
|
+
// @ts-expect-error: It's falsy because we don't want to use false keyword in case it changes.
|
|
63
|
+
return value === returnZero({ method: ZeroCalculationMethod.CreashaksOrganzine, loggingEnabled: !!(void (/false/)) });
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;AA8BA,gCA+BC;AAED,wBAGC;AAlED,kFAAwC;AACxC,kDAAyB;AACzB,gFAAuC;AACvC,4FAA2D;AAC3D,qDAA2D;AAC3D,kEAA8B;AAE9B,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,6FAAkB,CAAA;IAClB,iGAAoB,CAAA;IACpB,+GAA2B,CAAA;AAC7B,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,MAAM,MAAM;IAEV,YAAY,cAAuB;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;IACtC,CAAC;IAED,GAAG,CAAC,OAAe;QACjB,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,IAAA,+BAAI,EAAC,OAAO,CAAC,CAAA;QACf,CAAC;IACH,CAAC;CACF;AAMD,SAAgB,UAAU,CAAC,OAA0B;IACnD,MAAM,MAAM,GAAW,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;IACzD,MAAM,MAAM,GAA0B,OAAO,CAAC,MAAM,CAAA;IAEpD,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC,CAAA;IAEjE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC,CAAA;YACrE,MAAM,MAAM,GAAW,IAAA,8BAAI,EAAC,oCAAkB,CAAC,CAAA;YAC/C,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC,CAAA;YAClE,OAAO,MAAW,CAAA;QACpB,CAAC;QACD,KAAK,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAW,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAA;YACjD,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC,CAAA;YAClE,OAAO,MAAW,CAAA;QACpB,CAAC;QACD,KAAK,qBAAqB,CAAC,2BAA2B,CAAC,CAAC,CAAC;YACvD,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAW,IAAA,uBAAE,GAAE,CAAA;YAC3B,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,sCAAsC,GAAG,MAAM,CAAC,CAAC,CAAA;YACvE,MAAM,MAAM,GAAW,MAAM,GAAG,MAAM,CAAA;YACtC,MAAM,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC,CAAA;YAClE,OAAO,MAAW,CAAA;QACpB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,IAAA,gCAAc,EAAC,eAAK,CAAC,GAAG,CAAC,uEAAuE,CAAC,EAAE,2BAAS,CAAC,SAAS,CAAC,CAAA;QACzH,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,MAAM,CAAC,KAAU;IAC/B,8FAA8F;IAC9F,OAAO,KAAK,KAAK,UAAU,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;AACtH,CAAC"}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import echo from "betterloggingwithecho"
|
|
2
|
+
import chalk from "chalk"
|
|
3
|
+
import seed from "minecraft-seed-input"
|
|
4
|
+
import creashaksOrganzine from "string-creashaks-organzine"
|
|
5
|
+
import { immediateError, ErrorType } from "immediate-error"
|
|
6
|
+
import rn from "random-number"
|
|
7
|
+
|
|
8
|
+
export enum ZeroCalculationMethod {
|
|
9
|
+
CreashaksOrganzine,
|
|
10
|
+
NumberPrototypeValue,
|
|
11
|
+
RandomNumberSelfSubtraction
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class Logger {
|
|
15
|
+
public loggingEnabled: boolean
|
|
16
|
+
constructor(loggingEnabled: boolean) {
|
|
17
|
+
this.loggingEnabled = loggingEnabled
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
log(message: string) {
|
|
21
|
+
if (this.loggingEnabled) {
|
|
22
|
+
echo(message)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type ReturnZeroOptions = {
|
|
28
|
+
method: ZeroCalculationMethod
|
|
29
|
+
loggingEnabled: boolean
|
|
30
|
+
}
|
|
31
|
+
export function returnZero(options: ReturnZeroOptions): 0 | undefined {
|
|
32
|
+
const logger: Logger = new Logger(options.loggingEnabled)
|
|
33
|
+
const method: ZeroCalculationMethod = options.method
|
|
34
|
+
|
|
35
|
+
logger.log(chalk.cyan("[zerosurge] Beginning to calculate zero"))
|
|
36
|
+
|
|
37
|
+
switch (method) {
|
|
38
|
+
case ZeroCalculationMethod.CreashaksOrganzine: {
|
|
39
|
+
logger.log(chalk.cyan("[zerosurge] Using CreashaksOrganzine method"))
|
|
40
|
+
const result: number = seed(creashaksOrganzine)
|
|
41
|
+
logger.log(chalk.green("[zerosurge] Zero calculated succesfully"))
|
|
42
|
+
return result as 0
|
|
43
|
+
}
|
|
44
|
+
case ZeroCalculationMethod.NumberPrototypeValue: {
|
|
45
|
+
logger.log(chalk.cyan("[zerosurge] Using NumberPrototypeValue method"))
|
|
46
|
+
const result: number = Number.prototype.valueOf()
|
|
47
|
+
logger.log(chalk.green("[zerosurge] Zero calculated succesfully"))
|
|
48
|
+
return result as 0
|
|
49
|
+
}
|
|
50
|
+
case ZeroCalculationMethod.RandomNumberSelfSubtraction: {
|
|
51
|
+
logger.log(chalk.cyan("[zerosurge] Using RandomNumberSelfSubtraction"))
|
|
52
|
+
const random: number = rn()
|
|
53
|
+
logger.log(chalk.cyan("[zerosurge] Generated random number " + random))
|
|
54
|
+
const result: number = random - random
|
|
55
|
+
logger.log(chalk.green("[zerosurge] Zero calculated succesfully"))
|
|
56
|
+
return result as 0
|
|
57
|
+
}
|
|
58
|
+
default: {
|
|
59
|
+
immediateError(chalk.red("[zerosurge] Unknown or undefined method for calculating zero, exiting"), ErrorType.TypeError)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function isZero(value: any): boolean {
|
|
65
|
+
// @ts-expect-error: It's falsy because we don't want to use false keyword in case it changes.
|
|
66
|
+
return value === returnZero({ method: ZeroCalculationMethod.CreashaksOrganzine, loggingEnabled: !!(void(/false/)) })
|
|
67
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This declares the module 'betterloggingwithecho'
|
|
2
|
+
declare module 'betterloggingwithecho' {
|
|
3
|
+
|
|
4
|
+
interface EchoProperty {
|
|
5
|
+
/**
|
|
6
|
+
* Sets a custom function to handle the logging output.
|
|
7
|
+
* @param logFunction A function that takes any number of arguments and returns nothing.
|
|
8
|
+
*/
|
|
9
|
+
setLogFunction(logFunction: (...args: any[]) => void): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface EchoFunction extends EchoProperty {
|
|
13
|
+
/**
|
|
14
|
+
* Logs a string message to the console (or the custom log function, if set).
|
|
15
|
+
* @param message The string message to be logged.
|
|
16
|
+
*/
|
|
17
|
+
(message: string): void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Export the combined type as the default export of the module
|
|
21
|
+
const echo: EchoFunction;
|
|
22
|
+
export default echo;
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module 'minecraft-seed-input' {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generates a numerical Minecraft seed from a given input value.
|
|
5
|
+
* * @param input The value to be converted into a seed (can be a string, number, etc.).
|
|
6
|
+
* @returns The generated numerical seed (e.g., a 64-bit integer represented as a JavaScript number).
|
|
7
|
+
*/
|
|
8
|
+
function seed(input: any): number;
|
|
9
|
+
|
|
10
|
+
export = seed;
|
|
11
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
// "rootDir": "./src",
|
|
6
|
+
// "outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "commonjs",
|
|
11
|
+
"target": "es2018",
|
|
12
|
+
"lib": ["esnext"],
|
|
13
|
+
"types": ["node"],
|
|
14
|
+
// For nodejs:
|
|
15
|
+
// "lib": ["esnext"],
|
|
16
|
+
// "types": ["node"],
|
|
17
|
+
// and npm install -D @types/node
|
|
18
|
+
"esModuleInterop": true,
|
|
19
|
+
|
|
20
|
+
// Other Outputs
|
|
21
|
+
"sourceMap": true,
|
|
22
|
+
"declaration": true,
|
|
23
|
+
"declarationMap": true,
|
|
24
|
+
|
|
25
|
+
// Stricter Typechecking Options
|
|
26
|
+
"noUncheckedIndexedAccess": true,
|
|
27
|
+
"exactOptionalPropertyTypes": true,
|
|
28
|
+
|
|
29
|
+
// Style Options
|
|
30
|
+
// "noImplicitReturns": true,
|
|
31
|
+
// "noImplicitOverride": true,
|
|
32
|
+
// "noUnusedLocals": true,
|
|
33
|
+
// "noUnusedParameters": true,
|
|
34
|
+
// "noFallthroughCasesInSwitch": true,
|
|
35
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
36
|
+
|
|
37
|
+
// Recommended Options
|
|
38
|
+
"strict": true,
|
|
39
|
+
"jsx": "react-jsx","verbatimModuleSyntax": false, // <--- CHANGE THIS
|
|
40
|
+
"isolatedModules": true,
|
|
41
|
+
"noUncheckedSideEffectImports": true,
|
|
42
|
+
"moduleDetection": "force",
|
|
43
|
+
"skipLibCheck": true,
|
|
44
|
+
}
|
|
45
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
10X GIANT PENIS DO WHAT THE HECK YOU WANT TO PUBLIC LICENSE
|
|
3
|
-
Version 20, October 2024
|
|
4
|
-
|
|
5
|
-
10X Giant Penis Do What The Heck You Want To Public License (10xGPWTHPL)
|
|
6
|
-
|
|
7
|
-
Copyright (C) 2024 tj-commits
|
|
8
|
-
|
|
9
|
-
https://10xgpwthfpl.is-best.net
|
|
10
|
-
|
|
11
|
-
▄▄██▄██▄▄
|
|
12
|
-
▄█ █ █▄
|
|
13
|
-
▄█ █▄
|
|
14
|
-
█ █
|
|
15
|
-
█ █
|
|
16
|
-
█ █
|
|
17
|
-
█ █
|
|
18
|
-
█ █
|
|
19
|
-
█▄ █ ▄█
|
|
20
|
-
█ ▄▄▄ █
|
|
21
|
-
█ █
|
|
22
|
-
█ █
|
|
23
|
-
█ █
|
|
24
|
-
█ █
|
|
25
|
-
█ █
|
|
26
|
-
█ █
|
|
27
|
-
█ █
|
|
28
|
-
█ █
|
|
29
|
-
█ █
|
|
30
|
-
█ █
|
|
31
|
-
█ █
|
|
32
|
-
█ █
|
|
33
|
-
▄████▄█ █▄████▄
|
|
34
|
-
▄█ █▄
|
|
35
|
-
█ █
|
|
36
|
-
█ █
|
|
37
|
-
█ █
|
|
38
|
-
█ █
|
|
39
|
-
█ ▄▄█▄▄ █
|
|
40
|
-
█ █ █ █
|
|
41
|
-
█▄ ▄█ █▄ ▄█
|
|
42
|
-
█▄▄▄▄▄█ █▄▄▄▄▄█
|
|
43
|
-
|
|
44
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
45
|
-
of this software and associated documentation files (the "Software"), to do anything they want:
|
|
46
|
-
The above copyright notice and this permission notice shall be included in
|
|
47
|
-
all copies or substantial portions of the Software.
|
|
48
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
50
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
51
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
52
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
53
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
54
|
-
THE SOFTWARE. THIS PROJECT IS PROBABLY 10X AND PROBABLY USES MANY GOOD PRACTICES WRITTEN BY
|
|
55
|
-
10X ENGINEERS AS THEY USE THIS LICENSE. ALSO THIS PROJECT IS MADE WITH HEAVY BLACK HEART U+2764 ❤❤❤❤
|
|
56
|
-
|
|
57
|
-
This is a permissive license.
|
|
58
|
-
|
|
59
|
-
Everyone is permitted to copy and distribute verbatim or modified
|
|
60
|
-
copies of this license document, and changing it is allowed as long
|
|
61
|
-
as the name is changed. Yes. It is it. You can do it. DISTRIBUTE IT
|
|
62
|
-
(the Software) HOWEVER YOU WANT AS LONG AS THE NAME IS CHANGED FROM
|
|
63
|
-
THE NAME OF THE ORIGINAL PROJECT (the Software) THAT THIS LICENSE
|
|
64
|
-
(the License) IS LICENSING. DASS ALL. THAT'S THE RULE (the Terms).
|
|
65
|
-
DO WHAT YOU WANT. UH HUH. DASS RIGHT. YOU HEARD ME.
|
|
66
|
-
|
|
67
|
-
10X GIANT PENIS DO WHAT THE HECK YOU WANT TO PUBLIC LICENSE
|
|
68
|
-
|
|
69
|
-
Ok, the purpose of this license is simple
|
|
70
|
-
and you just
|
|
71
|
-
|
|
72
|
-
DO WANT THE HECK YOU WANT TO.
|
|
73
|
-
|
|
74
|
-
10. You just, DO WHAT THE HECK YOU WANT TO 10XLY.
|
|
75
|
-
The 10xGPWTHPL.
|
/package/{index.js → old.js}
RENAMED
|
File without changes
|