trivious 2.1.7 → 2.1.8

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.
@@ -6,7 +6,7 @@ const customId = {
6
6
  */
7
7
  decode: (customId2) => {
8
8
  const [context, identifier, info] = customId2.split(":");
9
- const [data, ...tags] = info?.split(".");
9
+ const [data, ...tags] = info ? info.split(".") : [void 0, void 0];
10
10
  return {
11
11
  context,
12
12
  identifier,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/customId/methods.customid.ts"],"names":["customId"],"mappings":";;AAGA,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA,EAIhB,MAAA,EAAQ,CAACA,SAAAA,KAAqB;AAC7B,IAAA,MAAM,CAAC,OAAA,EAAS,UAAA,EAAY,IAAI,CAAA,GAAIA,SAAAA,CAAS,MAAM,GAAG,CAAA;AAKtD,IAAA,MAAM,CAAC,IAAA,EAAM,GAAG,IAAI,CAAA,GAAI,IAAA,EAAM,MAAM,GAAG,CAAA;AAEvC,IAAA,OAAO;AAAA,MACN,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,MACA;AAAA,KACD;AAAA,EACD,CAAA;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ,CAAC,OAAA,KAA+B;AACvC,IAAA,MAAM,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAM,MAAK,GAAI,OAAA;AAC5C,IAAA,IAAIA,SAAAA,GAAW,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,UAAU,CAAA,CAAA;AAEvC,IAAA,IAAI,IAAA,EAAMA,SAAAA,IAAY,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAC9B,IAAA,IAAI,MAAMA,SAAAA,IAAY,IAAI,IAAA,CAAK,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAExC,IAAA,IAAIA,UAAS,MAAA,GAAS,GAAA,EAAK,MAAM,IAAI,cAAc,0CAA0C,CAAA;AAC7F,IAAA,OAAOA,SAAAA;AAAA,EACR;AACD,CAAA;AAEA,IAAO,wBAAA,GAAQ","file":"methods.customid.js","sourcesContent":["import { ComponentContext, ComponentCustomId, ComponentTag } from \"#typings\";\nimport { TriviousError } from \"#utility/errors.js\";\n\nconst customId = {\n\t/**\n\t * Decode a customId into its parts\n\t */\n\tdecode: (customId: string) => {\n\t\tconst [context, identifier, info] = customId.split(\":\") as [\n\t\t\tComponentContext,\n\t\t\tstring,\n\t\t\tstring | undefined,\n\t\t];\n\t\tconst [data, ...tags] = info?.split(\".\") as [string | undefined, ...ComponentTag[]];\n\n\t\treturn {\n\t\t\tcontext,\n\t\t\tidentifier,\n\t\t\tdata,\n\t\t\ttags,\n\t\t} as ComponentCustomId;\n\t},\n\t/**\n\t * Encode a customId\n\t */\n\tencode: (options: ComponentCustomId) => {\n\t\tconst { context, identifier, data, tags } = options;\n\t\tlet customId = `${context}:${identifier}`;\n\n\t\tif (data) customId += `:${data}`;\n\t\tif (tags) customId += `.${tags.join(\".\")}`;\n\n\t\tif (customId.length > 100) throw new TriviousError(\"Encoded customId exceeds 100 characters.\");\n\t\treturn customId;\n\t},\n} as const;\n\nexport default customId;\n"]}
1
+ {"version":3,"sources":["../../../src/features/customId/methods.customid.ts"],"names":["customId"],"mappings":";;AAGA,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA,EAIhB,MAAA,EAAQ,CAACA,SAAAA,KAAqB;AAC7B,IAAA,MAAM,CAAC,OAAA,EAAS,UAAA,EAAY,IAAI,CAAA,GAAIA,SAAAA,CAAS,MAAM,GAAG,CAAA;AAKtD,IAAA,MAAM,CAAC,IAAA,EAAM,GAAG,IAAI,CAAA,GAAI,IAAA,GACpB,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA,GACf,CAAC,MAAA,EAAW,MAAS,CAAA;AAExB,IAAA,OAAO;AAAA,MACN,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,MACA;AAAA,KACD;AAAA,EACD,CAAA;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ,CAAC,OAAA,KAA+B;AACvC,IAAA,MAAM,EAAE,OAAA,EAAS,UAAA,EAAY,IAAA,EAAM,MAAK,GAAI,OAAA;AAC5C,IAAA,IAAIA,SAAAA,GAAW,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,UAAU,CAAA,CAAA;AAEvC,IAAA,IAAI,IAAA,EAAMA,SAAAA,IAAY,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAC9B,IAAA,IAAI,MAAMA,SAAAA,IAAY,IAAI,IAAA,CAAK,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAExC,IAAA,IAAIA,UAAS,MAAA,GAAS,GAAA,EAAK,MAAM,IAAI,cAAc,0CAA0C,CAAA;AAC7F,IAAA,OAAOA,SAAAA;AAAA,EACR;AACD,CAAA;AAEA,IAAO,wBAAA,GAAQ","file":"methods.customid.js","sourcesContent":["import { ComponentContext, ComponentCustomId, ComponentTag } from \"#typings\";\nimport { TriviousError } from \"#utility/errors.js\";\n\nconst customId = {\n\t/**\n\t * Decode a customId into its parts\n\t */\n\tdecode: (customId: string) => {\n\t\tconst [context, identifier, info] = customId.split(\":\") as [\n\t\t\tComponentContext,\n\t\t\tstring,\n\t\t\tstring | undefined,\n\t\t];\n\t\tconst [data, ...tags] = info\n\t\t\t? (info.split(\".\") as [string | undefined, ...ComponentTag[]])\n\t\t\t: [undefined, undefined];\n\n\t\treturn {\n\t\t\tcontext,\n\t\t\tidentifier,\n\t\t\tdata,\n\t\t\ttags,\n\t\t} as ComponentCustomId;\n\t},\n\t/**\n\t * Encode a customId\n\t */\n\tencode: (options: ComponentCustomId) => {\n\t\tconst { context, identifier, data, tags } = options;\n\t\tlet customId = `${context}:${identifier}`;\n\n\t\tif (data) customId += `:${data}`;\n\t\tif (tags) customId += `.${tags.join(\".\")}`;\n\n\t\tif (customId.length > 100) throw new TriviousError(\"Encoded customId exceeds 100 characters.\");\n\t\treturn customId;\n\t},\n} as const;\n\nexport default customId;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trivious",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "discord-bot",