disgroove 2.0.0 → 2.1.0-dev.c430b6f
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/dist/lib/Client.d.ts +10 -1
- package/dist/lib/Client.js +193 -179
- package/dist/lib/constants.d.ts +17 -5
- package/dist/lib/constants.js +221 -209
- package/dist/lib/gateway/Shard.js +6 -1
- package/dist/lib/gateway/ShardManager.js +0 -1
- package/dist/lib/gateway/index.js +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/rest/CDN.js +0 -1
- package/dist/lib/rest/Endpoints.d.ts +4 -2
- package/dist/lib/rest/Endpoints.js +8 -5
- package/dist/lib/rest/RequestManager.d.ts +2 -3
- package/dist/lib/rest/RequestManager.js +17 -18
- package/dist/lib/rest/index.js +0 -1
- package/dist/lib/types/application-command.js +0 -1
- package/dist/lib/types/application-role-connection-metadata.js +0 -1
- package/dist/lib/types/application.js +0 -1
- package/dist/lib/types/audit-log.js +0 -1
- package/dist/lib/types/auto-moderation.js +0 -1
- package/dist/lib/types/channel.d.ts +4 -0
- package/dist/lib/types/channel.js +0 -1
- package/dist/lib/types/emoji.js +0 -1
- package/dist/lib/types/entitlements.js +0 -1
- package/dist/lib/types/gateway-events.d.ts +28 -0
- package/dist/lib/types/gateway-events.js +0 -1
- package/dist/lib/types/guild-scheduled-event.js +0 -1
- package/dist/lib/types/guild-template.js +0 -1
- package/dist/lib/types/guild.js +0 -1
- package/dist/lib/types/index.js +0 -1
- package/dist/lib/types/interaction.d.ts +3 -0
- package/dist/lib/types/interaction.js +0 -1
- package/dist/lib/types/invite.js +0 -1
- package/dist/lib/types/message-components.js +0 -1
- package/dist/lib/types/poll.d.ts +52 -0
- package/dist/lib/types/poll.js +2 -0
- package/dist/lib/types/role.js +0 -1
- package/dist/lib/types/sku.js +0 -1
- package/dist/lib/types/stage-instance.js +0 -1
- package/dist/lib/types/sticker.js +0 -1
- package/dist/lib/types/team.js +0 -1
- package/dist/lib/types/user.js +0 -1
- package/dist/lib/types/voice.js +0 -1
- package/dist/lib/types/webhook.d.ts +3 -0
- package/dist/lib/types/webhook.js +0 -1
- package/dist/lib/utils/Util.js +0 -1
- package/dist/lib/utils/errors.d.ts +1 -1
- package/dist/lib/utils/errors.js +4 -5
- package/dist/lib/utils/index.js +0 -1
- package/dist/package.json +4 -1
- package/package.json +4 -1
- package/dist/lib/Client.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/gateway/Shard.js.map +0 -1
- package/dist/lib/gateway/ShardManager.js.map +0 -1
- package/dist/lib/gateway/ShardsManager.d.ts +0 -6
- package/dist/lib/gateway/ShardsManager.js +0 -14
- package/dist/lib/gateway/ShardsManager.js.map +0 -1
- package/dist/lib/gateway/index.js.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/rest/CDN.js.map +0 -1
- package/dist/lib/rest/Endpoints.js.map +0 -1
- package/dist/lib/rest/REST.d.ts +0 -17
- package/dist/lib/rest/REST.js +0 -35
- package/dist/lib/rest/REST.js.map +0 -1
- package/dist/lib/rest/RequestManager.js.map +0 -1
- package/dist/lib/rest/RequestsManager.d.ts +0 -22
- package/dist/lib/rest/RequestsManager.js +0 -123
- package/dist/lib/rest/RequestsManager.js.map +0 -1
- package/dist/lib/rest/index.js.map +0 -1
- package/dist/lib/structures/Application.d.ts +0 -174
- package/dist/lib/structures/Application.js +0 -328
- package/dist/lib/structures/Application.js.map +0 -1
- package/dist/lib/structures/ApplicationCommand.d.ts +0 -45
- package/dist/lib/structures/ApplicationCommand.js +0 -127
- package/dist/lib/structures/ApplicationCommand.js.map +0 -1
- package/dist/lib/structures/AuditLog.d.ts +0 -19
- package/dist/lib/structures/AuditLog.js +0 -101
- package/dist/lib/structures/AuditLog.js.map +0 -1
- package/dist/lib/structures/AutoModerationRule.d.ts +0 -34
- package/dist/lib/structures/AutoModerationRule.js +0 -96
- package/dist/lib/structures/AutoModerationRule.js.map +0 -1
- package/dist/lib/structures/Base.d.ts +0 -10
- package/dist/lib/structures/Base.js +0 -23
- package/dist/lib/structures/Base.js.map +0 -1
- package/dist/lib/structures/Channel.d.ts +0 -254
- package/dist/lib/structures/Channel.js +0 -592
- package/dist/lib/structures/Channel.js.map +0 -1
- package/dist/lib/structures/ClientApplication.d.ts +0 -150
- package/dist/lib/structures/ClientApplication.js +0 -241
- package/dist/lib/structures/ClientApplication.js.map +0 -1
- package/dist/lib/structures/Emoji.d.ts +0 -26
- package/dist/lib/structures/Emoji.js +0 -75
- package/dist/lib/structures/Emoji.js.map +0 -1
- package/dist/lib/structures/Entitlement.d.ts +0 -24
- package/dist/lib/structures/Entitlement.js +0 -68
- package/dist/lib/structures/Entitlement.js.map +0 -1
- package/dist/lib/structures/Guild.d.ts +0 -474
- package/dist/lib/structures/Guild.js +0 -1141
- package/dist/lib/structures/Guild.js.map +0 -1
- package/dist/lib/structures/GuildMember.d.ts +0 -49
- package/dist/lib/structures/GuildMember.js +0 -146
- package/dist/lib/structures/GuildMember.js.map +0 -1
- package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -49
- package/dist/lib/structures/GuildScheduledEvent.js +0 -118
- package/dist/lib/structures/GuildScheduledEvent.js.map +0 -1
- package/dist/lib/structures/GuildTemplate.d.ts +0 -30
- package/dist/lib/structures/GuildTemplate.js +0 -72
- package/dist/lib/structures/GuildTemplate.js.map +0 -1
- package/dist/lib/structures/IdentifiableBase.d.ts +0 -15
- package/dist/lib/structures/IdentifiableBase.js +0 -25
- package/dist/lib/structures/IdentifiableBase.js.map +0 -1
- package/dist/lib/structures/Integration.d.ts +0 -31
- package/dist/lib/structures/Integration.js +0 -103
- package/dist/lib/structures/Integration.js.map +0 -1
- package/dist/lib/structures/Interaction.d.ts +0 -76
- package/dist/lib/structures/Interaction.js +0 -346
- package/dist/lib/structures/Interaction.js.map +0 -1
- package/dist/lib/structures/Invite.d.ts +0 -26
- package/dist/lib/structures/Invite.js +0 -82
- package/dist/lib/structures/Invite.js.map +0 -1
- package/dist/lib/structures/Message.d.ts +0 -86
- package/dist/lib/structures/Message.js +0 -303
- package/dist/lib/structures/Message.js.map +0 -1
- package/dist/lib/structures/Role.d.ts +0 -37
- package/dist/lib/structures/Role.js +0 -90
- package/dist/lib/structures/Role.js.map +0 -1
- package/dist/lib/structures/SKU.d.ts +0 -23
- package/dist/lib/structures/SKU.js +0 -63
- package/dist/lib/structures/SKU.js.map +0 -1
- package/dist/lib/structures/StageInstance.d.ts +0 -24
- package/dist/lib/structures/StageInstance.js +0 -57
- package/dist/lib/structures/StageInstance.js.map +0 -1
- package/dist/lib/structures/Sticker.d.ts +0 -31
- package/dist/lib/structures/Sticker.js +0 -86
- package/dist/lib/structures/Sticker.js.map +0 -1
- package/dist/lib/structures/Team.d.ts +0 -14
- package/dist/lib/structures/Team.js +0 -39
- package/dist/lib/structures/Team.js.map +0 -1
- package/dist/lib/structures/TestEntitlement.d.ts +0 -23
- package/dist/lib/structures/TestEntitlement.js +0 -61
- package/dist/lib/structures/TestEntitlement.js.map +0 -1
- package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
- package/dist/lib/structures/UnavailableGuild.js +0 -25
- package/dist/lib/structures/UnavailableGuild.js.map +0 -1
- package/dist/lib/structures/User.d.ts +0 -63
- package/dist/lib/structures/User.js +0 -177
- package/dist/lib/structures/User.js.map +0 -1
- package/dist/lib/structures/VoiceState.d.ts +0 -24
- package/dist/lib/structures/VoiceState.js +0 -66
- package/dist/lib/structures/VoiceState.js.map +0 -1
- package/dist/lib/structures/Webhook.d.ts +0 -82
- package/dist/lib/structures/Webhook.js +0 -223
- package/dist/lib/structures/Webhook.js.map +0 -1
- package/dist/lib/structures/index.d.ts +0 -28
- package/dist/lib/structures/index.js +0 -45
- package/dist/lib/structures/index.js.map +0 -1
- package/dist/lib/types/application-command.js.map +0 -1
- package/dist/lib/types/application-role-connection-metadata.js.map +0 -1
- package/dist/lib/types/application.js.map +0 -1
- package/dist/lib/types/audit-log.js.map +0 -1
- package/dist/lib/types/auto-moderation.js.map +0 -1
- package/dist/lib/types/channel.js.map +0 -1
- package/dist/lib/types/emoji.js.map +0 -1
- package/dist/lib/types/entitlements.js.map +0 -1
- package/dist/lib/types/gateway-events.js.map +0 -1
- package/dist/lib/types/guild-scheduled-event.js.map +0 -1
- package/dist/lib/types/guild-template.js.map +0 -1
- package/dist/lib/types/guild.js.map +0 -1
- package/dist/lib/types/index.js.map +0 -1
- package/dist/lib/types/interaction.js.map +0 -1
- package/dist/lib/types/invite.js.map +0 -1
- package/dist/lib/types/message-components.js.map +0 -1
- package/dist/lib/types/role.js.map +0 -1
- package/dist/lib/types/sku.js.map +0 -1
- package/dist/lib/types/stage-instance.js.map +0 -1
- package/dist/lib/types/sticker.js.map +0 -1
- package/dist/lib/types/team.js.map +0 -1
- package/dist/lib/types/user.js.map +0 -1
- package/dist/lib/types/voice.js.map +0 -1
- package/dist/lib/types/webhook.js.map +0 -1
- package/dist/lib/utils/Collection.d.ts +0 -24
- package/dist/lib/utils/Collection.js +0 -65
- package/dist/lib/utils/Collection.js.map +0 -1
- package/dist/lib/utils/Util.js.map +0 -1
- package/dist/lib/utils/errors.js.map +0 -1
- package/dist/lib/utils/index.js.map +0 -1
@@ -1,45 +0,0 @@
|
|
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("./Base"), exports);
|
18
|
-
__exportStar(require("./IdentifiableBase"), exports);
|
19
|
-
__exportStar(require("./Application"), exports);
|
20
|
-
__exportStar(require("./ApplicationCommand"), exports);
|
21
|
-
__exportStar(require("./AuditLog"), exports);
|
22
|
-
__exportStar(require("./AutoModerationRule"), exports);
|
23
|
-
__exportStar(require("./Channel"), exports);
|
24
|
-
__exportStar(require("./ClientApplication"), exports);
|
25
|
-
__exportStar(require("./Emoji"), exports);
|
26
|
-
__exportStar(require("./Entitlement"), exports);
|
27
|
-
__exportStar(require("./Guild"), exports);
|
28
|
-
__exportStar(require("./GuildMember"), exports);
|
29
|
-
__exportStar(require("./GuildScheduledEvent"), exports);
|
30
|
-
__exportStar(require("./GuildTemplate"), exports);
|
31
|
-
__exportStar(require("./Integration"), exports);
|
32
|
-
__exportStar(require("./Interaction"), exports);
|
33
|
-
__exportStar(require("./Invite"), exports);
|
34
|
-
__exportStar(require("./Message"), exports);
|
35
|
-
__exportStar(require("./Role"), exports);
|
36
|
-
__exportStar(require("./SKU"), exports);
|
37
|
-
__exportStar(require("./StageInstance"), exports);
|
38
|
-
__exportStar(require("./Sticker"), exports);
|
39
|
-
__exportStar(require("./Team"), exports);
|
40
|
-
__exportStar(require("./TestEntitlement"), exports);
|
41
|
-
__exportStar(require("./UnavailableGuild"), exports);
|
42
|
-
__exportStar(require("./User"), exports);
|
43
|
-
__exportStar(require("./VoiceState"), exports);
|
44
|
-
__exportStar(require("./Webhook"), exports);
|
45
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,qDAAmC;AACnC,gDAA8B;AAC9B,uDAAqC;AACrC,6CAA2B;AAC3B,uDAAqC;AACrC,4CAA0B;AAC1B,sDAAoC;AACpC,0CAAwB;AACxB,gDAA8B;AAC9B,0CAAwB;AACxB,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,wCAAsB;AACtB,kDAAgC;AAChC,4CAA0B;AAC1B,yCAAuB;AACvB,oDAAkC;AAClC,qDAAmC;AACnC,yCAAuB;AACvB,+CAA6B;AAC7B,4CAA0B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"application-command.js","sourceRoot":"","sources":["../../../lib/types/application-command.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"application-role-connection-metadata.js","sourceRoot":"","sources":["../../../lib/types/application-role-connection-metadata.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../lib/types/application.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"audit-log.js","sourceRoot":"","sources":["../../../lib/types/audit-log.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auto-moderation.js","sourceRoot":"","sources":["../../../lib/types/auto-moderation.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../lib/types/channel.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"emoji.js","sourceRoot":"","sources":["../../../lib/types/emoji.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../lib/types/entitlements.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"gateway-events.js","sourceRoot":"","sources":["../../../lib/types/gateway-events.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"guild-scheduled-event.js","sourceRoot":"","sources":["../../../lib/types/guild-scheduled-event.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"guild-template.js","sourceRoot":"","sources":["../../../lib/types/guild-template.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"guild.js","sourceRoot":"","sources":["../../../lib/types/guild.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,wDAAsC;AACtC,yEAAuD;AACvD,gDAA8B;AAC9B,8CAA4B;AAC5B,oDAAkC;AAClC,4CAA0B;AAC1B,0CAAwB;AACxB,iDAA+B;AAC/B,mDAAiC;AACjC,0DAAwC;AACxC,mDAAiC;AACjC,0CAAwB;AACxB,gDAA8B;AAC9B,2CAAyB;AACzB,uDAAqC;AACrC,yCAAuB;AACvB,wCAAsB;AACtB,mDAAiC;AACjC,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../lib/types/interaction.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../lib/types/invite.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"message-components.js","sourceRoot":"","sources":["../../../lib/types/message-components.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"role.js","sourceRoot":"","sources":["../../../lib/types/role.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sku.js","sourceRoot":"","sources":["../../../lib/types/sku.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"stage-instance.js","sourceRoot":"","sources":["../../../lib/types/stage-instance.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sticker.js","sourceRoot":"","sources":["../../../lib/types/sticker.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"team.js","sourceRoot":"","sources":["../../../lib/types/team.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../lib/types/user.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../lib/types/voice.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../lib/types/webhook.ts"],"names":[],"mappings":""}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export declare class Collection<K, V> extends Map<K, V> {
|
2
|
-
get empty(): boolean;
|
3
|
-
every<T extends V, ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => value is T, thisArg?: ThisArg): this is Array<T>;
|
4
|
-
every<ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): boolean;
|
5
|
-
filter<S extends V, ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, array: Array<V>) => value is S, thisArg?: ThisArg): Array<S>;
|
6
|
-
filter<ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): Array<V>;
|
7
|
-
find<S extends V, ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, obj: Array<V>) => value is S, thisArg?: ThisArg): S | undefined;
|
8
|
-
find<ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, obj: Array<V>) => unknown, thisArg?: ThisArg): V | undefined;
|
9
|
-
findIndex(predicate: (value: V, index: number, obj: Array<V>) => unknown, thisArg?: unknown): number;
|
10
|
-
first(): V | undefined;
|
11
|
-
first(amount: number): Array<V>;
|
12
|
-
last(): V | undefined;
|
13
|
-
last(amount: number): Array<V>;
|
14
|
-
map<T>(predicate: (value: V, index: number, obj: Array<V>) => T, thisArg?: unknown): Array<T>;
|
15
|
-
random(): V | undefined;
|
16
|
-
reduce(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V): V;
|
17
|
-
reduce(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V, initialValue: V): V;
|
18
|
-
reduce<T>(predicate: (previousValue: T, currentValue: V, currentIndex: number, array: Array<V>) => T, initialValue: T): T;
|
19
|
-
reduceRight(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V): V;
|
20
|
-
reduceRight(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V, initialValue: V): V;
|
21
|
-
reduceRight<T>(predicate: (previousValue: T, currentValue: V, currentIndex: number, array: Array<V>) => T, initialValue: T): T;
|
22
|
-
some<ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): boolean;
|
23
|
-
toArray(): Array<V>;
|
24
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Collection = void 0;
|
4
|
-
class Collection extends Map {
|
5
|
-
get empty() {
|
6
|
-
return this.size === 0;
|
7
|
-
}
|
8
|
-
every(predicate, thisArg) {
|
9
|
-
return this.toArray().every(predicate, thisArg);
|
10
|
-
}
|
11
|
-
filter(predicate, thisArg) {
|
12
|
-
return this.toArray().filter(predicate, thisArg);
|
13
|
-
}
|
14
|
-
find(predicate, thisArg) {
|
15
|
-
return this.toArray().find(predicate, thisArg);
|
16
|
-
}
|
17
|
-
findIndex(predicate, thisArg) {
|
18
|
-
return this.toArray().findIndex(predicate, thisArg);
|
19
|
-
}
|
20
|
-
first(amount) {
|
21
|
-
if (amount === undefined) {
|
22
|
-
const iterable = this.values();
|
23
|
-
return iterable.next().value;
|
24
|
-
}
|
25
|
-
if (amount < 0)
|
26
|
-
return this.last(amount * -1);
|
27
|
-
amount = Math.min(amount, this.size);
|
28
|
-
const iterable = this.values();
|
29
|
-
return Array.from({ length: amount }, () => iterable.next().value);
|
30
|
-
}
|
31
|
-
last(amount) {
|
32
|
-
const iterator = Array.from(this.values());
|
33
|
-
if (amount === undefined)
|
34
|
-
return iterator.at(-1);
|
35
|
-
if (amount < 0)
|
36
|
-
return this.first(amount * -1);
|
37
|
-
if (!amount)
|
38
|
-
return [];
|
39
|
-
return iterator.slice(-amount);
|
40
|
-
}
|
41
|
-
map(predicate, thisArg) {
|
42
|
-
return this.toArray().map(predicate, thisArg);
|
43
|
-
}
|
44
|
-
random() {
|
45
|
-
if (this.empty) {
|
46
|
-
return undefined;
|
47
|
-
}
|
48
|
-
const iterable = Array.from(this.values());
|
49
|
-
return iterable[Math.floor(Math.random() * iterable.length)];
|
50
|
-
}
|
51
|
-
reduce(predicate, initialValue) {
|
52
|
-
return this.toArray().reduce(predicate, initialValue);
|
53
|
-
}
|
54
|
-
reduceRight(predicate, initialValue) {
|
55
|
-
return this.toArray().reduceRight(predicate, initialValue);
|
56
|
-
}
|
57
|
-
some(predicate, thisArg) {
|
58
|
-
return this.toArray().some(predicate, thisArg);
|
59
|
-
}
|
60
|
-
toArray() {
|
61
|
-
return Array.from(this.values());
|
62
|
-
}
|
63
|
-
}
|
64
|
-
exports.Collection = Collection;
|
65
|
-
//# sourceMappingURL=Collection.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../lib/utils/Collection.ts"],"names":[],"mappings":";;;A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Y,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAND,oCAMC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB"}
|