Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const init = async (): Promise<IWasmModule | null> => {
}
};

const extractData = async (data: Uint8Array): Promise<IFileData[]> => {
export const extractData = async (data: Uint8Array): Promise<IFileData[]> => {
const wasmModule = await init();
if (!wasmModule) {
console.error('WASM module not initialized.');
Expand Down Expand Up @@ -73,7 +73,7 @@ const extractData = async (data: Uint8Array): Promise<IFileData[]> => {
}
};

const extract = async (url: string): Promise<IFileData[]> => {
export const extract = async (url: string): Promise<IFileData[]> => {
try {
const data = await fetchByteArray(url);
console.log('Data downloaded:', data);
Expand All @@ -84,6 +84,8 @@ const extract = async (url: string): Promise<IFileData[]> => {
}
};

export * from './types';

export default {
extract,
extractData
Expand Down