Gathering detailed insights and metrics for enplex.js
Gathering detailed insights and metrics for enplex.js
Gathering detailed insights and metrics for enplex.js
Gathering detailed insights and metrics for enplex.js
npm install enplex.js
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
4 Stars
50 Commits
3 Forks
1 Watchers
1 Branches
5 Contributors
Updated on Feb 05, 2025
Latest Version
1.2.0
Package Id
enplex.js@1.2.0
Unpacked Size
60.14 kB
Size
19.00 kB
File Count
38
NPM Version
11.0.0
Node Version
20.18.1
Published on
Feb 05, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
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.
1npm install enplex.js@latest
1const { NextChat } = require('enplex.js'); 2 3// Text Generation Example 4const response = await NextChat.ask("What can you tell me about JavaScript?", { 5 model: "gemini", 6 cache: true 7}); 8console.log(response); 9 10// Image Generation Example 11const image = await NextChat.imagine("A beautiful sunset over mountains", { 12 model: "prodia" 13}); 14console.log(image); 15 16// Text-to-Speech Example 17const audio = await NextChat.tts("Welcome to Enplex.js!"); 18console.log(audio); 19 20// Image Upscaling Example 21const upscaled = await NextChat.upscale("https://example.com/image.jpg"); 22console.log(upscaled);
<<<<<<< HEAD
4373eec0e4890a1e9409965d28881c518f952eb9
1// Basic usage 2const response = await NextChat.ask("What is JavaScript?", { 3 model: "gemini", 4 cache: true 5}); 6 7// Available models 8const models = [ 9 "gpt4o", "gemini", "llama-vision", 10 "gemma2-9b", "gemma-7b", "groq-70b", 11 "groq-8b", "llama3-70b", "llama3-8b", 12 "llama3-1b", "llama3-3b", "llama3-11b", 13 "llama3-90b", "llama-guard" 14];
1// Generate image 2const image = await NextChat.imagine("sunset over mountains", { 3 model: "prodia" 4}); 5 6// Available models 7const imgModels = ["animagen", "prodia", "mageai", "xl3"];
1// Convert text to speech 2const audio = await NextChat.tts("Hello World"); 3 4// Upscale images 5const upscaled = await NextChat.upscale(imageUrl);
1const { Search } = require('enplex.js'); 2 3// YouTube Search Example 4const videos = await Search.yt("programming tutorials"); 5console.log(videos); 6 7// GitHub Search Example 8const repos = await Search.github("javascript libraries"); 9console.log(repos); 10 11// Pinterest Search Example 12const pins = await Search.pin("web design inspiration"); 13console.log(pins); 14 15// Combined Search Example 16async function searchAllPlatforms(query) { 17 const [videos, repos, images] = await Promise.all([ 18 Search.yt(query), 19 Search.github(query), 20 Search.pin(query) 21 ]); 22 return { videos, repos, images }; 23}
1// YouTube Search 2const videos = await Search.yt("coding tutorials"); 3 4// GitHub Repositories 5const repos = await Search.github("javascript libraries"); 6 7// Pinterest Images 8const pins = await Search.pin("web design inspiration"); 9 10// Pexels Photos 11const photos = await Search.pexels("nature"); 12 13// Wallpapers 14const wallpapers = await Search.wallpaper("abstract"); 15 16// Anime Wallpapers 17const animeWalls = await Search.animeWallpaper("naruto");
Each search method returns a JSON response with relevant results from the respective platform.
1const { Rectify } = require('enplex.js'); 2 3const app = new Rectify(); 4 5// Middleware 6app.use(Rectify.bodyParser); 7app.use(Rectify.cors); 8 9// Routes 10app.get("/", (req, res) => { 11 res.json({ message: "Hello World" }); 12}); 13 14app.listen(3000);
1const { DiscordWebHook } = require('enplex.js'); 2 3const webhook = new DiscordWebHook({ 4 id: "WEBHOOK_ID", 5 token: "WEBHOOK_TOKEN" 6}); 7 8// Send Message 9await webhook.send("Hello Discord!"); 10 11// Send Embed 12const embed = await DiscordWebHook.createEmbed({ 13 title: "Hello", 14 description: "This is an embed" 15}); 16await webhook.send({ embeds: [embed] });
1const { Collection } = require('enplex.js'); 2 3const collection = new Collection(); 4collection.set('key', 'value'); 5 6// Advanced Methods 7const filtered = collection.filter(item => item.includes('value')); 8const mapped = collection.map(item => item.toUpperCase()); 9const random = collection.random();
1const { Validator } = require('enplex.js'); 2 3Validator.isEmail("user@example.com"); // true 4Validator.isURL("https://example.com"); // true 5Validator.isJSON('{"key": "value"}'); // true
1const { Xio } = require('enplex.js'); 2 3const response = await Xio.request("https://api.example.com", { 4 method: "POST", 5 body: { key: "value" }, 6 retry: { 7 maxAttempts: 3, 8 delay: 1000 9 } 10});
1try { 2 const response = await NextChat.ask("Question"); 3} catch (error) { 4 Logger.error(`AI Error: ${error.message}`); 5}
1// Handle empty inputs 2try { 3 await NextChat.ask(""); 4} catch (error) { 5 // Throws: "NextChat Error: Empty prompt" 6} 7 8// Handle invalid models 9try { 10 await NextChat.ask("Hello", { model: "invalid" }); 11} catch (error) { 12 // Throws: "NextChat Error: Invalid model" 13}
1try { 2 await NextChat.imagine("prompt", { timeout: 5000 }); 3} catch (error) { 4 // Handle timeout or network errors 5 Logger.error(`Network Error: ${error.message}`); 6}
1const { Rectify, Logger } = require('enplex.js'); 2 3const app = new Rectify(); 4 5// Middleware 6app.use(Rectify.bodyParser); 7app.use(Rectify.cors); 8app.use(Rectify.compression); 9 10// Routes 11app.get("/", (req, res) => res.send("Welcome")); 12app.post("/api/data", (req, res) => res.json(req.body)); 13 14// Error Handler 15app.useErrorHandler((error, req, res) => { 16 Logger.error(error.message); 17 res.status(500).json({ error: "Server Error" }); 18}); 19 20app.listen(3000, () => { 21 Logger.info("Server running on port 3000"); 22});
1const { NextChat, Logger } = require('enplex.js'); 2 3async function generateContent() { 4 try { 5 // Generate text 6 const text = await NextChat.ask("Describe a mountain landscape"); 7 8 // Generate matching image 9 const image = await NextChat.imagine(text); 10 11 return { text, image }; 12 } catch (error) { 13 Logger.error(`Generation failed: ${error.message}`); 14 throw error; 15 } 16}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ by the OpenDevsFlow Team
No vulnerabilities found.
No security vulnerabilities found.