npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nextify.js

v0.0.5

Published

your go-to multipurpose npm package designed to simplify development tasks

Downloads

371

Readme

Introduction

Welcome to Nextify.js, your go-to multipurpose npm package designed to simplify development tasks. If you encounter any issues or need assistance, feel free to reach out on Discord: koushik0p (ID: 1050641070368772166).

Key Features

  • NextChat: Effortlessly interact with a range of AI models without requiring an API key.
  • Http: Simplify the process of making HTTP requests.
  • NsfwFilter: Accurately detect NSFW content from images.
  • NextRL: Develop interactive CLI tools with ease.
  • Rectify: Build web applications with an optimized, Express.js-like framework.

Usage

NextChat

Interact with AI models for text and image generation.

const { nextchat } = require("nextify.js");

(async () => {
    const options = {
        model: "bard", // Options: bard, gemini, gpt, gpt4, llama, codellama, mixtral
        cache: true // Enable caching for faster responses
    };
    const resp = await nextchat.ask("Hello, what's your name?", options);
    console.log(resp);
})();
const { nextchat } = require("nextify.js");

(async () => {
    const resp = await nextchat.imagine("a cute cat");
    console.log(resp); // Output as .url or .base64
})();

Http

Execute HTTP requests with customizable options.

const { http } = require("nextify.js");

(async () => {
    const resp = await http.fetch("Your_Url", {
        method: "get", // Specify method: get, post, etc.
        auth: "Bearer Your_Token", // Optional authentication
        data: { prompt: "hello" }, // Optional data payload
        params: { prompt: "hello" } // Optional query parameters
    });
    console.log(resp);
})();

NsfwFilter

Filter images for NSFW content to ensure safety and compliance.

const { nsfwfilter } = require("nextify.js");

(async () => {
    const resp = await nsfwfilter.detect("Your_Image_URL"); // Pass image URL
    if (resp.isNsfw) {
        console.log("NSFW content detected");
    } else {
        console.log("Content is safe");
    }
})();

NextRL

Create dynamic CLI tools for interactive sessions.

const { NextRL } = require("nextify.js");

const rl = new NextRL();

function askName() {
    rl.question('What is your name? ', (name) => {
        if (name.toUpperCase() === 'EXIT') {
            console.log('Goodbye!');
            rl.close();
            return;
        }

        console.log(`Hello, ${name}!`);
        rl.close();
    });
}

askName();

Rectify

Build web applications, an optimized framework for handling routes, middleware, and static files, similar to Express.js.

const { Rectify } = require('nextify.js');
const path = require('path');

const app = new Rectify();

// Middleware example: Logs all requests
app.use(async (req, res, next) => {
    console.log(`${req.method} ${req.url}`);
    next();
});

// Route: GET /
app.route('GET', '/', async (req, res) => {
    res.writeHead(200, { 'Content-Type': 'text/html' });
    res.end('<h1>Welcome to Rectify Server</h1>');
});

// Route: GET /user/:id
app.route('GET', '/user/:id', async (req, res) => {
    res.writeHead(200, { 'Content-Type': 'application/json' });
    res.end(JSON.stringify({ userId: req.params.id }));
});

// Static files: Serve files from the public directory
app.serveStatic(path.join(__dirname, 'public'));

// Start the server on port 3000
app.listen(3000);

Support

Need help? Join our Discord Community for support, discussions, and updates.