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

@arun_murali/rustyutils

v1.0.11

Published

Node functon library build using wasm-pack

Readme

📘 Function Documentation

Introduction

Welcome to the function documentation for our project! This document provides detailed descriptions, parameters, return values, and example usages for all available functions. It is designed to help you understand how each function works and how to use them in your projects. Below you'll find a table of contents that links to each function’s detailed documentation.

Table of Contents

deep_clone()

Description: Creates a deep copy of the given input.

Example usage:

const cloned = deep_clone({ key: 'value' });
console.log(cloned); // Output: { key: 'value' }

Parameters

| Name | Type | Description | |------|------|-------------| | input | any | The value to clone. |

Returns

| Type | Description | |------|-------------| | any | The deeply cloned value. |


flatten()

Description: Flattens a nested object or array into a single-level object with dot-separated keys.

Example usage:

const flattened = flatten({ 'a.b.c': 1 });
console.log(flattened); // Output: { 'a.b.c': 1 }

Parameters

| Name | Type | Description | |------|------|-------------| | input | any | The object or array to flatten. |

Returns

| Type | Description | |------|-------------| | any | The flattened object with dot-separated keys representing the hierarchy of the original structure. |


hash_value()

Description: Generates a hash of the input string using the specified algorithm.

Example usage:

const hash = hash_value('hello world', 'sha256');
console.log(hash); // Output: e.g. '64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477246bfe2f30e6e5aef'

Parameters

| Name | Type | Description | |------|------|-------------| | input | string | The input string to hash. | | algo | string | The hash algorithm to use. Supported: 'sha256', 'sha512', 'md5', 'sha3_256', 'sha3_512', 'blake2b', 'blake2s'. |

Returns

| Type | Description | |------|-------------| | string | The hexadecimal string of the hash output. |


compare_hash()

Description: Compares an input string against a given hash using the specified algorithm.

Example usage:

const isValid = compare_hash('hello world', 'sha256', '64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477246bfe2f30e6e5aef');
console.log(isValid); // Output: true

Parameters

| Name | Type | Description | |------|------|-------------| | input | string | The input string to hash and compare. | | algo | string | The hashing algorithm to use. Same options as in hash_value. | | expected_hash | string | The expected hash string to compare with. |

Returns

| Type | Description | |------|-------------| | boolean | Returns true if the generated hash matches the expected hash; otherwise, false. |


chunk()

Description: Splits an input array into smaller chunks of a specified size.

Example usage:

const result = chunk([1, 2, 3, 4, 5], 2);
console.log(result); // Output: [[1, 2], [3, 4], [5]]

Parameters

| Name | Type | Description | |------|------|-------------| | input | Array<any> | The input array to be divided into chunks. | | size | number | The maximum size of each chunk. |

Returns

| Type | Description | |------|-------------| | Array<Array<any>> | Returns an array of chunked arrays. |