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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sly-utils

v2.0.0

Published

sly-utils is a modular and efficient JavaScript utility library designed to simplify complex tasks.

Readme

sly-utils

sly-utils is a modular and efficient JavaScript utility library designed to simplify complex tasks.

Installation

npm install sly-utils

Usage

In JavaScript

// ES Module
import { chunk, camelToSnake, uuid } from 'sly-utils';

const arr = [1, 2, 3, 4, 5, 6];
console.log(chunk(arr, 2)); // [[1,2],[3,4],[5,6]]
console.log(camelToSnake('helloWorld')); // 'hello_world'
console.log(uuid()); // 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'

In TypeScript

import { chunk, camelToSnake, uuid } from 'sly-utils';
// TypeScript will provide type checking and autocompletion

Exports & Structure

  • All utilities are available as named exports from the main package entry.
  • TypeScript types are included automatically for all utilities.
  • The package supports ES Module imports.

List of Utility Methods

  • Compare strings (compute the Levenshtein distance between two strings)
  • Convert map to json
  • Convert json to map
  • Deep freeze a nested object
  • Escape HTML tags as HTML entities
  • Flatten a nested object
  • Generate UUID & UUIDShort
  • Strip HTML tags
  • Transform keys
  • Transform URL strings to SEO-friendly URLs

Utility Methods for Array & Array of Objects

  • Check if two given arrays are the same
  • Chunk an array
  • Find the common elements of two arrays
  • Find if a given string exists in an array of objects
  • Group by array of objects
  • Move an element in an array from one position to another
  • Pluck values from an array of objects
  • Remove duplicates from an array of objects
  • Shuffle an array
  • Sort an array of objects

Utility Methods for String Conversion

  • Camel case to snake case
  • Camel case to kebab case
  • Camel case to Pascal case
  • Kebab case to snake case
  • Kebab case to camel case
  • Kebab case to Pascal case
  • Pascal case to camel case
  • Pascal case to kebab case
  • Pascal case to snake case
  • Snake case to camel case
  • Snake case to Pascal case
  • Snake case to kebab case

Build & Type Support

  • The package includes pre-built JavaScript bundles for both CommonJS and ES Module consumers.
  • TypeScript declaration files are included for full type safety and autocompletion.
  • No additional configuration is needed for most modern build tools.

Report & Contribute

Sly-utils is currently in active development and fine-tuning. If you encounter any issues, please open a GitHub issue. If you would like to contribute, please open a GitHub Pull Request.

Support

Your support inspires & encourage us more. If you are interested to make a donation to us, please click the below PayPal button.

PayPal.me

Author

OpenSly

License

License: MIT