stacks-arrays

Convert, flatten, and statistically analyze arrays with @stacksjs/arrays.

622|17|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-arrays
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stacks-arrays
Source: https://github.com/stacksjs/stacks/tree/main/.claude/skills/stacks-arrays
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-arrays

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing and transforming data in arrays across Stacks projects requires a cohesive set of utilities for conversion, flattening, manipulation, and statistical analysis.

Core Features & Use Cases

  • Comprehensive array conversions (toArray, flatten, unique, shuffle, sample)
  • Robust statistical functions (average, median, mode, variance, standard deviation, percentile, covariance)
  • Containment checks and array manipulation helpers (contains, containsAll, last, at, move, remove)
  • Arr facade for ergonomic TypeScript usage and easy API surface

Quick Start

Install the @stacksjs/arrays package and begin using Arr and the statistical helpers in your project.

Frequently Asked Questions about stacks-arrays

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate variance and standard deviation for a dataset in TypeScript?▼

The @stacksjs/arrays package provides statistical functions for TypeScript that compute sum, average, median, mode, variance, and standard deviation using population formulas. It exposes a dedicated Arr facade for ergonomic integration in Stacks projects.

What is the best way to flatten and merge nested arrays in a Stacks application?▼

The Arr facade from the @stacksjs/arrays package handles array flattening and merging in Stacks. It provides conversion utilities including toArray and flatten for transforming nested structures into unified datasets.

Does the @stacksjs/arrays package support unique filtering and random sampling?▼

Yes, @stacksjs/arrays supports unique filtering and random sampling. It includes specific helpers for extracting unique values, shuffling datasets, and pulling random samples to support data processing workflows.

How do I perform containment checks across multiple values in a TypeScript array?▼

The Arr facade offers contains and containsAll helpers to perform containment checks in TypeScript arrays. These utilities verify whether specific values or complete sets exist within your target dataset.

Can I use @stacksjs/arrays for statistical analysis without additional dependencies?▼

Yes, @stacksjs/arrays operates without additional dependencies to perform statistical analysis. It natively calculates median, mode, covariance, and percentile using population formulas directly within your TypeScript project.