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

uzbek

v1.2.6

Published

My own library!

Downloads

11

Readme

Uzdev

Installation

You can install the package via npm:

npm install uzdev

Configuration

Add the following variables to your environment file (.env.development, .env.production, or .env):

# MySQL module

MYSQL_USERNAME=<your_mysql_username>
MYSQL_HOST=<your_mysql_host>
MYSQL_DATABASE=<your_mysql_database>
MYSQL_PASSWORD=<your_mysql_password>
MYSQL_WAIT=true # defaul
MYSQL_CONNECTION_LIMIT=10 # defaul
MYSQL_QUEUE_LIMIT=0 # defaul
MYSQL_MULTIPLE_STATEMENTS=true # defaul
MYSQL_CONNECT_TIMEOUT=60000 # defaul
MYSQL_DATE_STR=true # defaul

# Function module

JWT_KEY=<your_jwt_key>
JWT_EXPIRES_IN=10d # defaul

# Sender module

EMAIL_LOGIN=<your_email_login>
EMAIL_PASSWORD=<your_email_password>
FROM_EMAIL=<from_email_address>
SMS_ESKIZ_TOKEN=<your_eskiz_first_token>,
SMS_ESKIZ_EMIAL=<your_eskiz_email>,
SMS_ESKIZ_FROM=<your_eskiz_from_code>

Example

MySQL Module

const { execute } = require("uzdev/mysql");

(async () => {
  try {
    const result = await execute("select * from fact_users", [], 1);
    console.log(result);
  } catch (error) {
    console.error(error);
  }
})();

Function Module

const { decode, encode } = require("uzdev/function");

(async () => {
  try {
    const encrypted = await encode({ hello: "salom" });
    console.log(encrypted);
    console.log(decode(encrypted));
  } catch (error) {
    console.error(error);
  }
})();

Sender Module

You will need to buy an SMS package from "eskiz.uz" and you will need to create a specific text template "eskiz.uz".

const { emailSender, smsSender } = require("uzdev/sender");

(async () => {
  emailSender(
    "[email protected]",
    "Test email",
    "<b> Hello bro <b>",
    (email, status, message) => {
      if (status == 1) return console.log("SUCCESS", email, message);
      console.log("ERROR", email, message);
    }
  );

  smsSender(
    "995441550",
    "Webdoc.io platformasi uchun tasdiqlash kodi: 12345",
    (phone, status, message) => {
      if (status == 1) return console.log("SUCCESS", phone, message);
      console.log("ERROR", phone, message);
    }
  );
})();

DevOps

Can create a sequence of commands as desired For example, to do git push and pull, you don't need to learn webhook or other additional tools.

{
  "push": [
    {
      "name": "add",
      "command": "git add ."
    },
    {
      "name": "commit",
      "command": "git commit -m 'Update from $(whoami) on $(date +\"%Y-%m-%d %T\")'"
    },
    {
      "name": "push",
      "command": "git push"
    }
  ],
  "pull": [
    {
      "name": "pull",
      "command": "git pull"
    },
    {
      "name": "pm2 restart",
      "command": "pm2 restart all"
    }
  ]
}
# command example:
uzdev push
uzdev pull

Joi

License

This README covers the installation, configuration, and usage of your npm package uzdev, including examples for each module. Adjust the placeholders with your actual credentials and customize it further if needed.