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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zuaque/mini-package

v1.0.11

Published

Multiple mini packages to get started

Readme

Mini-Package

This Project is created for beginners to create multiple things given below with super ease and full control. Made with Love 💖 By Zuaque.

Articles

  • Sort Array
  • Prettify Milliseconds
  • Insert CSS Code
  • Insert Box Shadows
  • Add Border Radius
  • Is Prime Number
  • Is Odd Number
  • Square Root
  • Cube Root, any number root
  • Round Off
  • Loading
  • Skeleton Loading User Template
  • Custom Loader
  • UUID

Getting Started

  npm  i @zuaque/mini-package

or Use CDN

  https://unpkg.com/@zuaque/[email protected]/<file>.js

Methods of Usage

In Modular Javascript or React Js, Next Js, etc.

  import {package} from "@zuaque/mini-package";

In Non-Modular Javascript or Node JS, etc.

var { package } = require("@zuaque/mini-package");

Without NPM or With CDN

  https://unpkg.com/@zuaque/[email protected]/<file>.js

Documentation

Sort Array

Sorting the Array in Ascending, Descending Order

Example:

var { sortArray } = require("@zuaque/mini-package");
const sampleArray = ["Orange", "Mango", "Apple"];
sortArray(sampleArray, "asc");

// Expected Output: ["Apple", "Mango", "Orange"]

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/index.js"
></script>
<!-- Use Function sortArray -->

Syntax:

sortArray(array, type);

Type - It can be asc desc init-asc init-desc

  • asc means Ascending Order
  • desc means Descending Order
  • init-desc means Ascending Order of Integers
  • init-desc means Descending Order of Integers

Prettify Milliseconds

Convert Milliseconds into Human Readable String

Example:

var { pretty_ms } = require("@zuaque/mini-package");
const milliseconds = 60000;
pretty_ms(milliseconds);

// Expected Output: 1 Minutes
// For example if milliseconds = 600718718718700;
// Output is 19313 years

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/index.js"
></script>
<!-- Use Function pretty_ms -->

Syntax:

pretty_ms(milliseconds);

Expected Output Value can be in

  • years
  • months
  • days
  • hours
  • Minutes
  • seconds

The Output will be given in the nearest Output Value

Insert CSS Code

Insert CSS code in Style Tag inside of Head tag.

Example:

  var {insertCss} = require("@zuaque/mini-package/css)
  const code = `
    .border{
        border: 5px solid red;
    }
  `
  insertCss(code);

  // Expected Output: true

or

<script script="https://unpkg.com/@zuaque/[email protected]/css.js"></script>
<!-- Use Function insertCss -->

Syntax:

insertCss(code);

Box Shadow

Add Box Shadow with Super ease without any prerequisite.

  var {boxShadow} = require("@zuaque/mini-package/css)
  boxShadow("medium", "gray", "box");

  // Expected Output: true

or

<script script="https://unpkg.com/@zuaque/[email protected]/css.js"></script>
<!-- Use Function boxShadow -->

Output Image

Syntax:

boxShadow(type, color, className);

Type - It can be the type of Box Shadow.

  • small
  • x-small
  • medium
  • large Color - It can be the color of the Box Shadow.

className - Add the class of the element on which you want to add Box Shadow.

Border Radius

Add Border Radius with Super Ease.

Example:

  var {borderRadius} = require("@zuaque/mini-package/css)
  boxShadow("10", "sample");

  // Expected Output: true

or

<script script="https://unpkg.com/@zuaque/[email protected]/css.js"></script>
<!-- Use Function borderRadius -->

Expected Output

Syntax:

boxShadow(radius, className);

Radius - Radius of the Border.

className - Add the class of the element on which you want to add Border Radius.

Is Prime Number

Syntax:

var { is_prime } = require("@zuaque/mini-package/maths");
is_prime(n);

// Here n is the number and output is true or false

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function is_prime -->

Is Even Number

Syntax:

var { is_even } = require("@zuaque/mini-package/maths");
is_even(n);

// Here n is the number and output is true or false

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function is_even -->

Is Odd Number

Syntax:

var { is_odd } = require("@zuaque/mini-package/maths");
is_odd(n);

// Here n is the number and output is true or false

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function is_odd -->

Square Root

Syntax:

var { sqrt_root } = require("@zuaque/mini-package/maths");
sqrt_root(n);

// Here n is the number and output is the number

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function sqrt_root -->

Any Root

Syntax:

var { any_root } = require("@zuaque/mini-package/maths");
sqrt_root(n, root);

// Here n is the number, root can be square as 2, cube as 3, ... and output is the number

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function anyy_root -->

Round Off

Syntax:

var { round_off } = require("@zuaque/mini-package/maths");
round_off(n, decimal_digit);

// Here n is the number
// decimal_digit is the digit till you want to round off.
// Output is Rounded off Number

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/maths.js"
></script>
<!-- Use Function round_off -->

Loading

Syntax:

var { loading } = require("@zuaque/mini-package/loading");
loading(type);

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/loading.js"
></script>
<!-- Use Function loading -->

type - Can be start or end.

  • start means start loading
  • stop means stop loading

Skeleton Loading User Template

Syntax:

var { skeleton_div_user_template } = require("@zuaque/mini-package/loading");
loading(parent_div_id, color, count);

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/loading.js"
></script>
<!-- Use Function skeleton_div_user_template -->

Expected Output

parent_div_id - Means the id in which you want to add it.

color - Means the color of the Loader

count - Means the number of loaders you want.

Custom Loader

Syntax:

var { customLoader } = require("@zuaque/mini-package/loading");
loading(code, style, count);

or

<script
  script="https://unpkg.com/@zuaque/[email protected]/loading.js"
></script>
<!-- Use Function customLoader -->

Code - Your HTML code of the Loader.

Style - Your CSS style of the code

Count - Number of Loaders you want for the same.

UUID

It will generate Random Secure Id Tokens.

Syntax:

var uuid = require("@zuaque/mini-package/uuid");
uuid();

or

<script script="https://unpkg.com/@zuaque/[email protected]/uuid.js"></script>
<!-- Use Function uuid -->

Authors