@zoodogood/utils 1.0.2 → 1.0.4-change.334
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/lib/discordjs/mod.d.ts +37 -0
- package/lib/discordjs/mod.js +79 -0
- package/lib/nodejs/getChildProcessUtils.d.ts +15 -2
- package/lib/nodejs/getChildProcessUtils.js +24 -32
- package/lib/objectives/DotNotatedInterface.d.ts +23 -0
- package/lib/objectives/DotNotatedInterface.js +60 -0
- package/lib/objectives/GlitchText.js +2 -2
- package/lib/objectives/getRandomElementFromArray.d.ts +7 -0
- package/lib/objectives/getRandomElementFromArray.js +24 -0
- package/lib/objectives/getRandomNumberInRange.d.ts +7 -0
- package/lib/objectives/getRandomNumberInRange.js +8 -0
- package/lib/objectives/mod.d.ts +3 -2
- package/lib/objectives/mod.js +2 -1
- package/lib/objectives/rangeToArray.d.ts +1 -0
- package/lib/objectives/rangeToArray.js +6 -0
- package/package.json +24 -10
- package/readme.md +4 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function CreateMessage({ content, title, url, author, thumbnail, description, color, fields, image, video, footer, timestamp, ephemeral, fetchReply, components, files, reference }: {
|
|
2
|
+
content: any;
|
|
3
|
+
title: any;
|
|
4
|
+
url: any;
|
|
5
|
+
author: any;
|
|
6
|
+
thumbnail: any;
|
|
7
|
+
description: any;
|
|
8
|
+
color: any;
|
|
9
|
+
fields: any;
|
|
10
|
+
image: any;
|
|
11
|
+
video: any;
|
|
12
|
+
footer: any;
|
|
13
|
+
timestamp: any;
|
|
14
|
+
ephemeral: any;
|
|
15
|
+
fetchReply: any;
|
|
16
|
+
components: any;
|
|
17
|
+
files: any;
|
|
18
|
+
reference: any;
|
|
19
|
+
}): {
|
|
20
|
+
embeds: EmbedBuilder[];
|
|
21
|
+
files: any;
|
|
22
|
+
reply: {
|
|
23
|
+
messageReference: any;
|
|
24
|
+
};
|
|
25
|
+
components: any;
|
|
26
|
+
content: any;
|
|
27
|
+
ephemeral: any;
|
|
28
|
+
fetchReply: any;
|
|
29
|
+
};
|
|
30
|
+
export function CreateModal({ title, customId, components }: {
|
|
31
|
+
title: any;
|
|
32
|
+
customId: any;
|
|
33
|
+
components: any;
|
|
34
|
+
}): import("discord.js").APIModalInteractionResponseCallbackData;
|
|
35
|
+
export function SimplifyComponents(data: any): any;
|
|
36
|
+
export function isEmptyEmbed(embed: any): boolean;
|
|
37
|
+
import { EmbedBuilder } from 'discord.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { EmbedBuilder, ModalBuilder, resolveColor, ActionRow } from 'discord.js';
|
|
2
|
+
import { ComponentType } from 'discord-api-types/v10';
|
|
3
|
+
function isEmptyEmbed(embed) {
|
|
4
|
+
const DEFAULT_PROPERTIES = {
|
|
5
|
+
title: undefined,
|
|
6
|
+
author: undefined,
|
|
7
|
+
thumbnail: undefined,
|
|
8
|
+
description: undefined,
|
|
9
|
+
fields: undefined,
|
|
10
|
+
image: undefined,
|
|
11
|
+
footer: undefined,
|
|
12
|
+
timestamp: undefined,
|
|
13
|
+
video: undefined
|
|
14
|
+
};
|
|
15
|
+
// in isEmptyEmbed context is a good compare
|
|
16
|
+
const isEqualDefault = (key) => String(embed[key]) === String(DEFAULT_PROPERTIES[key]);
|
|
17
|
+
const isEveryPropertyDefault = Object.keys(DEFAULT_PROPERTIES)
|
|
18
|
+
.every(isEqualDefault);
|
|
19
|
+
return isEveryPropertyDefault;
|
|
20
|
+
}
|
|
21
|
+
function CreateMessage({ content, title, url, author, thumbnail, description, color, fields, image, video, footer, timestamp, ephemeral, fetchReply, components, files, reference }) {
|
|
22
|
+
const message = {};
|
|
23
|
+
thumbnail && (thumbnail = { url: thumbnail });
|
|
24
|
+
image && (image = { url: image });
|
|
25
|
+
video && (video = { url: video });
|
|
26
|
+
color = resolveColor(color !== null && color !== void 0 ? color : "Random");
|
|
27
|
+
const embed = new EmbedBuilder({
|
|
28
|
+
title, url, author, thumbnail,
|
|
29
|
+
description, color, fields,
|
|
30
|
+
image, video, footer, timestamp
|
|
31
|
+
});
|
|
32
|
+
if (!isEmptyEmbed(embed.data)) {
|
|
33
|
+
message.embeds = [embed];
|
|
34
|
+
}
|
|
35
|
+
if (files) {
|
|
36
|
+
message.files = files;
|
|
37
|
+
}
|
|
38
|
+
if (reference)
|
|
39
|
+
message.reply = {
|
|
40
|
+
messageReference: reference
|
|
41
|
+
};
|
|
42
|
+
message.components = components ? SimplifyComponents(components) : null;
|
|
43
|
+
message.content = content;
|
|
44
|
+
message.ephemeral = ephemeral;
|
|
45
|
+
message.fetchReply = fetchReply;
|
|
46
|
+
return message;
|
|
47
|
+
}
|
|
48
|
+
function CreateModal({ title, customId, components }) {
|
|
49
|
+
components = SimplifyComponents(components);
|
|
50
|
+
return new ModalBuilder({ title, customId, components }).toJSON();
|
|
51
|
+
}
|
|
52
|
+
function SimplifyComponents(data) {
|
|
53
|
+
if (data instanceof Array && data.length === 0)
|
|
54
|
+
return [];
|
|
55
|
+
const isComponent = (component) => "type" in component;
|
|
56
|
+
const isActionRow = (component) => component instanceof Array && isComponent(component.at(0)) || component instanceof ActionRow;
|
|
57
|
+
const isComponents = (component) => component.length && isActionRow(component.at(0));
|
|
58
|
+
const argumentType = [
|
|
59
|
+
isComponent(data),
|
|
60
|
+
isActionRow(data),
|
|
61
|
+
isComponents(data)
|
|
62
|
+
].findIndex(Boolean);
|
|
63
|
+
if (argumentType === -1)
|
|
64
|
+
throw new TypeError("expected component");
|
|
65
|
+
const inArray = (component) => [component];
|
|
66
|
+
const arrayToActionRow = (componentsArray) => {
|
|
67
|
+
if (componentsArray.type === ComponentType.ActionRow)
|
|
68
|
+
return componentsArray;
|
|
69
|
+
return { type: ComponentType.ActionRow, components: componentsArray };
|
|
70
|
+
};
|
|
71
|
+
const actionRowInArray = (actionRow) => [actionRow];
|
|
72
|
+
if (argumentType <= 0)
|
|
73
|
+
data = inArray(data);
|
|
74
|
+
if (argumentType <= 1)
|
|
75
|
+
data = actionRowInArray(data);
|
|
76
|
+
data = data.map(arrayToActionRow);
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
79
|
+
export { CreateMessage, CreateModal, SimplifyComponents, isEmptyEmbed };
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { ChildProcessWithoutNullStreams } from "child_process";
|
|
3
|
+
import EventsEmitter from "events";
|
|
4
|
+
interface IContext {
|
|
5
|
+
exitter: {
|
|
6
|
+
resolve: any;
|
|
7
|
+
reject: any;
|
|
8
|
+
};
|
|
9
|
+
whenEnd: Promise<unknown>;
|
|
10
|
+
child: ChildProcessWithoutNullStreams;
|
|
11
|
+
emitter: EventsEmitter;
|
|
12
|
+
outString: string;
|
|
13
|
+
}
|
|
1
14
|
interface IParams {
|
|
2
15
|
root: string;
|
|
3
16
|
logger?: boolean;
|
|
4
17
|
}
|
|
5
18
|
declare const _default: ({ root, logger }: IParams) => {
|
|
6
|
-
run: (command: string, params: string[]) =>
|
|
7
|
-
info: (
|
|
19
|
+
run: (command: string, params: string[]) => IContext;
|
|
20
|
+
info: (log: string) => void;
|
|
8
21
|
_npm: string;
|
|
9
22
|
};
|
|
10
23
|
export default _default;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { spawn } from "child_process";
|
|
11
2
|
import EventsEmitter from "events";
|
|
12
3
|
export default ({ root, logger = false }) => {
|
|
@@ -15,16 +6,16 @@ export default ({ root, logger = false }) => {
|
|
|
15
6
|
const EventsCallbacks = [
|
|
16
7
|
{
|
|
17
8
|
key: "stdoutError",
|
|
18
|
-
callback({
|
|
9
|
+
callback({ exitter }, error) {
|
|
19
10
|
logger && info(`Error: ${error.message}`);
|
|
20
|
-
|
|
11
|
+
exitter.reject(error);
|
|
21
12
|
},
|
|
22
13
|
},
|
|
23
14
|
{
|
|
24
15
|
key: "stderrError",
|
|
25
|
-
callback({
|
|
16
|
+
callback({ exitter }, error) {
|
|
26
17
|
logger && info(`Error: ${error.message}`);
|
|
27
|
-
|
|
18
|
+
exitter.reject(error);
|
|
28
19
|
},
|
|
29
20
|
},
|
|
30
21
|
{
|
|
@@ -53,34 +44,35 @@ export default ({ root, logger = false }) => {
|
|
|
53
44
|
},
|
|
54
45
|
{
|
|
55
46
|
key: "exit",
|
|
56
|
-
callback({
|
|
57
|
-
|
|
47
|
+
callback({ exitter, outString }) {
|
|
48
|
+
exitter.resolve(outString);
|
|
58
49
|
},
|
|
59
50
|
},
|
|
60
51
|
{
|
|
61
52
|
key: "error",
|
|
62
|
-
callback({
|
|
53
|
+
callback({ exitter }, error) {
|
|
63
54
|
logger && info(`Error: ${error.message}`);
|
|
64
|
-
|
|
55
|
+
exitter.reject(error);
|
|
65
56
|
},
|
|
66
57
|
},
|
|
67
58
|
];
|
|
68
|
-
const info = (
|
|
69
|
-
const run = (command, params) =>
|
|
59
|
+
const info = (log) => console.info(`\x1b[1m${log}\x1b[22m`);
|
|
60
|
+
const run = (command, params) => {
|
|
70
61
|
const child = spawn(command, params, { cwd: root });
|
|
71
|
-
const
|
|
72
|
-
const promise = new Promise((resolve, reject) => Object.assign(
|
|
62
|
+
const exitter = { resolve: null, reject: null };
|
|
63
|
+
const promise = new Promise((resolve, reject) => Object.assign(exitter, { resolve, reject }));
|
|
73
64
|
const emitter = new EventsEmitter();
|
|
74
65
|
const outString = "";
|
|
66
|
+
const context = {
|
|
67
|
+
exitter,
|
|
68
|
+
whenEnd: promise,
|
|
69
|
+
child,
|
|
70
|
+
emitter,
|
|
71
|
+
outString,
|
|
72
|
+
};
|
|
75
73
|
const events = Object.fromEntries(EventsCallbacks.map(({ callback, key }) => [
|
|
76
74
|
key,
|
|
77
|
-
callback.bind(null,
|
|
78
|
-
exitData,
|
|
79
|
-
promise,
|
|
80
|
-
child,
|
|
81
|
-
emitter,
|
|
82
|
-
outString,
|
|
83
|
-
}),
|
|
75
|
+
callback.bind(null, context),
|
|
84
76
|
]));
|
|
85
77
|
(() => {
|
|
86
78
|
child.stdout.on("error", events.stdoutError);
|
|
@@ -89,7 +81,7 @@ export default ({ root, logger = false }) => {
|
|
|
89
81
|
child.stderr.on("data", events.stderrData);
|
|
90
82
|
child.on("error", events.error);
|
|
91
83
|
child.on("message", events.message);
|
|
92
|
-
child.on("
|
|
84
|
+
child.on("exit", events.exit);
|
|
93
85
|
})();
|
|
94
86
|
promise.finally(() => {
|
|
95
87
|
child.stdout.removeListener("error", events.stdoutError);
|
|
@@ -98,9 +90,9 @@ export default ({ root, logger = false }) => {
|
|
|
98
90
|
child.stderr.removeListener("data", events.stderrData);
|
|
99
91
|
child.removeListener("error", events.error);
|
|
100
92
|
child.removeListener("message", events.message);
|
|
101
|
-
child.removeListener("
|
|
93
|
+
child.removeListener("exit", events.exit);
|
|
102
94
|
});
|
|
103
|
-
return
|
|
104
|
-
}
|
|
95
|
+
return context;
|
|
96
|
+
};
|
|
105
97
|
return { run, info, _npm };
|
|
106
98
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface IMethodsOptions {
|
|
2
|
+
defaultValue?: any;
|
|
3
|
+
allowSetFunctions?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class DotNotatedInterface {
|
|
6
|
+
target: Record<string, unknown>;
|
|
7
|
+
constructor(target: DotNotatedInterface["target"]);
|
|
8
|
+
getItem<T>(key: string, options?: IMethodsOptions): T | null;
|
|
9
|
+
setItem<T>(key: string, value: CallableFunction, options?: IMethodsOptions): T;
|
|
10
|
+
hasItem(key: string, options?: IMethodsOptions): boolean;
|
|
11
|
+
removeItem(key: string, options?: IMethodsOptions): boolean;
|
|
12
|
+
getParentAndlastSegmentByNotatedKey(key: string, { needFillIfParentNotExists }: {
|
|
13
|
+
needFillIfParentNotExists?: boolean | undefined;
|
|
14
|
+
}): {
|
|
15
|
+
parent: object | null;
|
|
16
|
+
lastSegment: string;
|
|
17
|
+
};
|
|
18
|
+
fillIsNotExists({ parent, segment, }: {
|
|
19
|
+
parent: {};
|
|
20
|
+
segment: string;
|
|
21
|
+
}): string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export class DotNotatedInterface {
|
|
2
|
+
constructor(target) {
|
|
3
|
+
this.target = target;
|
|
4
|
+
}
|
|
5
|
+
getItem(key, options = {}) {
|
|
6
|
+
var _a;
|
|
7
|
+
const { parent, lastSegment } = this.getParentAndlastSegmentByNotatedKey(key, { needFillIfParentNotExists: false });
|
|
8
|
+
if (!parent || lastSegment in parent === false) {
|
|
9
|
+
return (_a = options.defaultValue) !== null && _a !== void 0 ? _a : null;
|
|
10
|
+
}
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
return parent[lastSegment];
|
|
13
|
+
}
|
|
14
|
+
setItem(key, value, options = {}) {
|
|
15
|
+
if (typeof value === "function" && !options.allowSetFunctions) {
|
|
16
|
+
value = value(this.getItem(key, options));
|
|
17
|
+
}
|
|
18
|
+
const { parent, lastSegment } = this.getParentAndlastSegmentByNotatedKey(key, { needFillIfParentNotExists: true });
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
return (parent[lastSegment] = value);
|
|
21
|
+
}
|
|
22
|
+
hasItem(key, options = {}) {
|
|
23
|
+
const { parent, lastSegment } = this.getParentAndlastSegmentByNotatedKey(key, { needFillIfParentNotExists: false });
|
|
24
|
+
if (parent === null) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return lastSegment in parent;
|
|
28
|
+
}
|
|
29
|
+
removeItem(key, options = {}) {
|
|
30
|
+
const { parent, lastSegment } = this.getParentAndlastSegmentByNotatedKey(key, { needFillIfParentNotExists: false });
|
|
31
|
+
if (!parent) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
return delete parent[lastSegment];
|
|
36
|
+
}
|
|
37
|
+
getParentAndlastSegmentByNotatedKey(key, { needFillIfParentNotExists = false }) {
|
|
38
|
+
const pathSegments = key.split(".");
|
|
39
|
+
if (!pathSegments.length) {
|
|
40
|
+
throw new Error("Empty path to property");
|
|
41
|
+
}
|
|
42
|
+
let parent = this.target;
|
|
43
|
+
for (let segment of pathSegments.slice(0, -1)) {
|
|
44
|
+
needFillIfParentNotExists &&
|
|
45
|
+
(segment = this.fillIsNotExists({ parent, segment }));
|
|
46
|
+
if (parent[segment] === undefined) {
|
|
47
|
+
return { parent: null, lastSegment: segment };
|
|
48
|
+
}
|
|
49
|
+
parent = parent[segment];
|
|
50
|
+
}
|
|
51
|
+
return { parent, lastSegment: pathSegments.at(-1) };
|
|
52
|
+
}
|
|
53
|
+
fillIsNotExists({ parent, segment, }) {
|
|
54
|
+
if (segment in parent === false) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
parent[segment] = {};
|
|
57
|
+
}
|
|
58
|
+
return segment;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getRandomNumberInRange } from "./getRandomNumberInRange.js";
|
|
2
2
|
class GlitchText {
|
|
3
3
|
constructor(from = "", to = "hello, world", { step = 15, random = false, maximum = 100 } = {}) {
|
|
4
4
|
this.from = from;
|
|
@@ -18,7 +18,7 @@ class GlitchText {
|
|
|
18
18
|
word.pop();
|
|
19
19
|
if (word.length < target.length)
|
|
20
20
|
word.push(String.fromCharCode(~~(Math.random() * 50)));
|
|
21
|
-
word.forEach((_, index, array) => array[index] = String.fromCharCode(
|
|
21
|
+
word.forEach((_, index, array) => array[index] = String.fromCharCode(getRandomNumberInRange({ min: MIN, max: MAX })));
|
|
22
22
|
yield word.join("");
|
|
23
23
|
}
|
|
24
24
|
if (this.maximum)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface IParams {
|
|
2
|
+
needPop?: boolean;
|
|
3
|
+
associatedWeights?: number[];
|
|
4
|
+
}
|
|
5
|
+
export declare function getRandomElementIndexInWeights(weights: NonNullable<IParams["associatedWeights"]>): number | never;
|
|
6
|
+
export declare function getRandomElementFromArray<T>(array: T[], { needPop, associatedWeights }?: IParams): T;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getRandomNumberInRange } from "./getRandomNumberInRange.js";
|
|
2
|
+
export function getRandomElementIndexInWeights(weights) {
|
|
3
|
+
if (weights.length < 1) {
|
|
4
|
+
new Error("Invalid array length");
|
|
5
|
+
}
|
|
6
|
+
let previousLimit = 0;
|
|
7
|
+
const thresholds = weights.map((weight) => (previousLimit += weight));
|
|
8
|
+
const lotterySecretNumber = Math.random() * thresholds.at(-1);
|
|
9
|
+
return thresholds.findIndex((threshold) => threshold >= lotterySecretNumber);
|
|
10
|
+
}
|
|
11
|
+
export function getRandomElementFromArray(array, { needPop, associatedWeights } = {}) {
|
|
12
|
+
if (associatedWeights && associatedWeights.length !== array.length) {
|
|
13
|
+
throw new Error("Incorrectly passed argument associatedWeights: The length of the associatedWeights must exactly match the length of the weights array");
|
|
14
|
+
}
|
|
15
|
+
const index = associatedWeights
|
|
16
|
+
? getRandomElementIndexInWeights(associatedWeights)
|
|
17
|
+
: getRandomNumberInRange({ max: array.length });
|
|
18
|
+
const input = array[index];
|
|
19
|
+
if (needPop) {
|
|
20
|
+
array.splice(index, 1);
|
|
21
|
+
associatedWeights === null || associatedWeights === void 0 ? void 0 : associatedWeights.splice(index, 1);
|
|
22
|
+
}
|
|
23
|
+
return input;
|
|
24
|
+
}
|
package/lib/objectives/mod.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './CustomCollector.js';
|
|
2
2
|
export * from './GlitchText.js';
|
|
3
|
-
export * from './
|
|
4
|
-
|
|
3
|
+
export * from './getRandomNumberInRange.js';
|
|
4
|
+
export * from './rangeToArray.js';
|
|
5
|
+
declare function omit(object: Object, filter: CallableFunction): {
|
|
5
6
|
[k: string]: any;
|
|
6
7
|
};
|
|
7
8
|
export { omit };
|
package/lib/objectives/mod.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './CustomCollector.js';
|
|
2
2
|
export * from './GlitchText.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './getRandomNumberInRange.js';
|
|
4
|
+
export * from './rangeToArray.js';
|
|
4
5
|
function omit(object, filter) {
|
|
5
6
|
const entries = Object.entries(object)
|
|
6
7
|
.filter(([key, value], i) => filter(key, value, i));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rangeToArray([min, max]: [number, number]): number | number[];
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoodogood/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4-change.334",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"homepage": "https://zoodogood.github.io/utils",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "
|
|
11
|
-
"docs-build": "cd ./docs
|
|
10
|
+
"test": "vitest",
|
|
11
|
+
"docs-build": "cd ./docs && retype build --output ./public",
|
|
12
|
+
"docs-watch": "cd ./docs && retype watch",
|
|
13
|
+
"prepack": "tsc",
|
|
14
|
+
"build": "tsc"
|
|
12
15
|
},
|
|
13
16
|
"typings": "lib/index",
|
|
14
17
|
"exports": {
|
|
@@ -28,8 +31,9 @@
|
|
|
28
31
|
"devDependencies": {
|
|
29
32
|
"@types/node": "^20.5.9",
|
|
30
33
|
"discord.js": "^14.13.0",
|
|
31
|
-
"
|
|
32
|
-
"typescript": "^5.2.2"
|
|
34
|
+
"retypeapp-linux-x64": "^3.3.0",
|
|
35
|
+
"typescript": "^5.2.2",
|
|
36
|
+
"vitest": "^0.34.5"
|
|
33
37
|
},
|
|
34
38
|
"peerDependencies": {
|
|
35
39
|
"discord.js": "=>14.x.x"
|
|
@@ -39,11 +43,21 @@
|
|
|
39
43
|
],
|
|
40
44
|
"typesVersions": {
|
|
41
45
|
">=4.2": {
|
|
42
|
-
"*": [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
46
|
+
"*": [
|
|
47
|
+
"lib/index.d.ts"
|
|
48
|
+
],
|
|
49
|
+
"primitives": [
|
|
50
|
+
"lib/primitives/mod.d.ts"
|
|
51
|
+
],
|
|
52
|
+
"objectives": [
|
|
53
|
+
"lib/objectives/mod.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"discordjs": [
|
|
56
|
+
"lib/discordjs/mod.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"nodejs": [
|
|
59
|
+
"lib/nodejs/mod.d.ts"
|
|
60
|
+
]
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
}
|
package/readme.md
CHANGED
|
@@ -7,4 +7,7 @@ https://zoodogood.github.io/utils/public
|
|
|
7
7
|
export { ending } from '@zoodogood/utils/primitives';
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
[NPM](https://www.npmjs.com/package/@zoodogood/utils)
|
|
10
|
+
[NPM](https://www.npmjs.com/package/@zoodogood/utils)
|
|
11
|
+
|
|
12
|
+
#### From developer:
|
|
13
|
+
(Wa) Use only documented functions that are not marked "Unstable". Thanks.
|