npm

zipouter
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

zipouter

npm version License

A simple npm package to extract and process the contents of a zip file.

Installation

npm install zipouter

Additional Package to Install

npm install adm-zip

Usage

const { extractAndProcessZip } = require("zipouter");
or;
import { extractAndProcessZip } from "zipouter";

const zipFileName = "your-zip-file.zip";

extractAndProcessZip(zipFileName)
  .then((results) => {
    console.log("Compilation Results:", results);
  })
  .catch((error) => {
    console.error("Error:", error.message);
  });

Important

Before proceeding further, ensure that you have Java, Node.js, and Python installed on your local machine. You can download and install them from the official websites:

Features

  • Extract and process zip files.
  • Support for multiple programming languages, including Java, JavaScript, Python, and more.

API Reference

extractAndProcessZip(zipFileName: string): Promise<CompilationResult[]>

Extracts and processes the contents of a zip file.

  • zipFileName: The name of the zip file to process.

Returns a promise that resolves to an array of CompilationResult objects.

CompilationResult

  • fileName: Name of the processed file.
  • output: Compilation output or error message.

Supported Languages

  • Java: Files with a .java extension.
  • JavaScript: Files with a .js extension.
  • Python: Files with a .py extension.

Example

0.First upload your zip file in the current directory

image

1.import and use the extractAndProcessZip from zipouter

import { extractAndProcessZip } from "zipouter";

const zipFileName = "example.zip";
extractAndProcessZip(zipFileName)
  .then((results) => {
    console.log("Compilation Results:", results);
  })
  .catch((error) => {
    console.error("Error:", error);
  });

2.Output

image

License

This project is licensed under the MIT License - see the LICENSE file for details.

Issues

If you encounter any issues or have suggestions, please open an issue on GitHub.

Package Sidebar

Install

npm i zipouter

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

13.9 kB

Total Files

11

Last publish

Collaborators

  • thecoderadi