Comparing version 1.0.8 to 1.0.9
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ class Embed { |
@@ -0,0 +0,0 @@ const Embed = require("./embed.js"); |
@@ -0,0 +0,0 @@ class Executor { |
@@ -0,0 +0,0 @@ async function Import(module) { |
@@ -0,1 +1,3 @@ | ||
const Buffer = require('node:buffer').Buffer; | ||
class NextChat { | ||
@@ -12,3 +14,3 @@ constructor() { | ||
const cacheKey = `<span class="math-inline">\{options\.model\}\-</span>{prompt}`; | ||
const cacheKey = `${options.model}-${prompt}`; | ||
@@ -36,3 +38,5 @@ if (options.cache && this.cache.has(cacheKey)) { | ||
try { | ||
return await NextChat.#fetchData(prompt, options.model); | ||
const blob = await NextChat.#fetchData(prompt, options.model); | ||
const arrayBuffer = await blob.arrayBuffer(); // Convert Blob to ArrayBuffer | ||
return Buffer.from(new Uint8Array(arrayBuffer)).toString('base64'); // Convert to base64 | ||
} catch (err) { | ||
@@ -45,3 +49,5 @@ throw new Error("NextChat error: " + err); | ||
try { | ||
return await NextChat.#fetchData(url, "upscale"); | ||
const blob = await NextChat.#fetchData(url, "upscale"); | ||
const arrayBuffer = await blob.arrayBuffer(); // Convert Blob to ArrayBuffer | ||
return Buffer.from(new Uint8Array(arrayBuffer)).toString('base64'); // Convert to base64 | ||
} catch (err) { | ||
@@ -54,3 +60,5 @@ throw new Error("NextChat error: " + err); | ||
try { | ||
return await NextChat.#fetchData(txt, "tts"); | ||
const blob = await NextChat.#fetchData(txt, "tts"); | ||
const arrayBuffer = await blob.arrayBuffer(); // Convert Blob to ArrayBuffer | ||
return Buffer.from(new Uint8Array(arrayBuffer)).toString('base64'); // Convert to base64 | ||
} catch (err) { | ||
@@ -97,5 +105,5 @@ throw new Error("NextChat error: " + err); | ||
} else if (model === "upscale") { | ||
return await (await fetch(`${api}/api/4k?url=${prompt}`)).json(); | ||
return await (await fetch(`${api}/api/4k?url=${prompt}`)).blob(); | ||
} else if (model === "tts") { | ||
return await (await fetch(`${api}tts?text=${prompt}`)).json(); | ||
return await (await fetch(`${api}tts?text=${prompt}`)).blob(); | ||
} else { | ||
@@ -102,0 +110,0 @@ throw new Error(`NextChat Error: Invalid model: ${model}`); |
@@ -0,0 +0,0 @@ class Random { |
@@ -0,0 +0,0 @@ const http = require("node:http"); |
@@ -0,0 +0,0 @@ class Middleware { |
@@ -0,0 +0,0 @@ class Request { |
@@ -0,0 +0,0 @@ class Response { |
@@ -0,0 +0,0 @@ class Route { |
@@ -0,0 +0,0 @@ class Search { |
@@ -0,0 +0,0 @@ class Xio { |
{ | ||
"name": "enplex.js", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Enplex is a versatile JavaScript library. providing a unified interface for multiple APIs and services, Enplex empowers developers to build innovative solutions efficiently.", | ||
@@ -75,2 +75,2 @@ "main": "compiler.js", | ||
} | ||
} | ||
} |
@@ -1,6 +0,21 @@ | ||
**Enplex.js: A Comprehensive JavaScript Toolkit** | ||
<p align = "center"> | ||
![Screenshot 2024-12-24 205609](https://github.com/user-attachments/assets/415145ab-18f3-4da2-8298-80b6fde96db3) | ||
</p> | ||
<h1 align = "center"> | ||
Enplex.js: A Comprehensive JavaScript Toolkit | ||
</h1> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/enplex.js"> | ||
<img src="https://img.shields.io/badge/npm-package-red.svg"> | ||
</a> | ||
</p> | ||
## 💻 About: | ||
Enplex.js is a versatile JavaScript library designed to simplify and enhance web development. It provides a unified interface for interacting with various APIs and services, empowering developers to build robust and innovative applications. | ||
**Key Features:** | ||
## ⭐ Key Features: | ||
@@ -28,3 +43,3 @@ * **NextChat:** | ||
**Installation:** | ||
## ⚡ Installation: | ||
@@ -35,5 +50,5 @@ ```bash | ||
**Usage Example:** | ||
## Usage Example: | ||
```javascript | ||
```js | ||
const { NextChat } = require("enplex.js"); | ||
@@ -51,2 +66,1 @@ | ||
**Enplex.js: Your All-in-One JavaScript Solution** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35445
23
480
64
20