Converting ES6 back to CJS (#25)

converting back to cjs

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
This commit is contained in:
2026-02-28 14:39:32 -05:00
committed by GitHub
parent 72b70f5175
commit 39a7115803
10 changed files with 126 additions and 125 deletions

View File

@@ -1,7 +1,7 @@
import {enums} from "../enums.js";
import {memberHelper} from "./memberHelper.js";
const enums = require("../enums.js");
const memberHelper = require("./memberHelper.js");
const ih = {};
const importHelper = {};
/**
* Tries to import from Pluralkit.
@@ -12,7 +12,7 @@ const ih = {};
* @returns {Promise<string>} A successful addition of all members.
* @throws {Error} When the member exists, or creating a member doesn't work.
*/
ih.pluralKitImport = async function (authorId, attachmentUrl= null) {
importHelper.pluralKitImport = async function (authorId, attachmentUrl= null) {
let fetchResult, pkData;
if (!attachmentUrl) {
throw new Error(enums.err.NOT_JSON_FILE);
@@ -55,4 +55,4 @@ ih.pluralKitImport = async function (authorId, attachmentUrl= null) {
return aggregatedText;
}
export const importHelper = ih;
module.exports = importHelper;