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

@rickyzz/arrays_bolt2025

v1.0.0

Published

A comprehensive TypeScript utility library for array operations with React components for demonstration.

Readme

@rickyzz/arrays_bolt2025

A comprehensive TypeScript utility library for array operations with React components for demonstration.

Features

  • 🚀 Type-safe array operations
  • 💪 Robust string handling
  • 🎯 2D array support
  • ⚛️ React demo component included
  • 📦 Zero dependencies (except React for demo component)
  • 🔒 TypeScript support out of the box

Installation

npm install @rickyzz/arrays_bolt2025

Usage

Array Operations

import { 
  isNotEmpty, 
  uniqueAndConvertToArray, 
  lastElement,
  lastRecords,
  clean
} from '@rickyzz/arrays_bolt2025';

// Check if array is not empty
const hasItems = isNotEmpty(['a', 'b', 'c']); // true

// Get unique values
const unique = uniqueAndConvertToArray(['a', 'a', 'b']); // ['a', 'b']

// Get last element
const last = lastElement(['a', 'b', 'c']); // 'c'

// Get last N records
const lastTwo = lastRecords(['a', 'b', 'c'], 2); // ['b', 'c']

// Clean array (remove empty elements and duplicates)
const cleaned = clean(['a', '', 'a', 'b']); // ['a', 'b']

2D Array Operations

import { sort2dArray, isTwoDimensionalArray } from '@rickyzz/arrays_bolt2025';

const data = [
  ['banana', '2'],
  ['apple', '1'],
  ['cherry', '3']
];

// Sort 2D array by first column
const sorted = sort2dArray(data); // Sorts alphabetically by first column

// Check if array is 2D
const is2D = isTwoDimensionalArray(data); // true

String Operations

import { contains, toLowerCaseUnbreakable } from '@rickyzz/arrays_bolt2025';

// Case-insensitive string contains
const hasText = contains('HELLO', 'hello world'); // true

// Safe lowercase conversion
const lower = toLowerCaseUnbreakable('Hello'); // 'hello'

React Demo Component

import { ArrayUtilsDemo } from '@rickyzz/arrays_bolt2025';

function App() {
  return (
    <ArrayUtilsDemo 
      initialArray="apple banana cherry"
      initial2DArray={[
        ['apple', '1'],
        ['banana', '2'],
        ['cherry', '3']
      ]}
    />
  );
}

API Reference

Array Functions

  • isInArrayCaseInsensitive(item: string, arr?: string[]): boolean
  • isNotEmpty(arr: unknown[]): boolean
  • isTwoDimensionalArray(arr: unknown[]): boolean
  • stringToArray(str: string | string[]): string[]
  • arrayToString(arr: string | string[]): string
  • uniqueAndConvertToArray<T>(arr: T[]): T[]
  • lastElement<T>(arr: T[]): T
  • lastRecords<T>(arr: T[] | undefined, num: number): T[]
  • removeEmptyElements<T>(arr: T[] | undefined): T[]
  • clean<T>(arr: T[]): T[]
  • remove<T>(arr: T[], value: T): T[]
  • sort2dArray(arr: TwoDArray, column?: number, direction?: 'asc' | 'desc'): TwoDArray

String Functions

  • toLowerCaseUnbreakable(str: string): string
  • trimUnbreakable(str: string): string
  • contains(needle: string, haystack: string): boolean

React Components

ArrayUtilsDemo

Props:

  • className?: string - Additional CSS classes
  • initialArray?: string - Initial array for demonstration
  • initial2DArray?: string[][] - Initial 2D array for demonstration

License

MIT

Author

rickyzz