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

aspava

v1.0.1

Published

## Overview

Readme

README for ASPAVA JavaScript Library

Overview

The ASPAVA is a versatile JavaScript library designed to manipulate and generate sequences of words or phrases. It is a flexible and easy-to-use tool that can be particularly useful for various applications, such as text processing, generative art, and educational purposes.

This library is built around a simple yet powerful class, AspavaGenerator, which provides various methods for manipulating a list of words or phrases. By default, it comes with a predefined list of words, but it can be easily customized to suit your needs.

Features

  • Customizable Word List: Start with a default set of words or input your own list.
  • Various Manipulation Methods: Includes methods for shuffling, sorting (ascending and descending), changing case, and more.
  • Generator Function: Utilize a generator function for iterative word generation.
  • Easy to Integrate: Designed as an ES6 module, making it straightforward to include in modern JavaScript projects.

Installation

To use the ASPAVA in your project, simply include it as a module. Ensure that you have a JavaScript environment that supports ES6 modules.

import aspava from "npm:aspava";

Usage

Initialization

Create an instance of AspavaGenerator with the default word list, or provide your own array of words.

import { AspavaGenerator } from "npm:aspava";

const customWords = ["Word1", "Word2", "Word3"];
const aspava = new AspavaGenerator(customWords);

Basic Methods

  1. Get a specific word:

    const word = aspava.get(2); // Returns the 3rd word in the list
  2. Get all words:

    const words = aspava.getAll(); // Returns all words in the list
  3. Get words as a string:

    const str = aspava.getAsString(); // Returns all words joined by a space
  4. Get first letters of each word:

    const initials = aspava.getFirstLetters(); // Returns a string of initials

Manipulation Methods

  1. Shuffle the words:

    aspava.shuffle(); // Randomly shuffles the words
  2. Sort words in ascending order:

    aspava.ascending(); // Sorts the words alphabetically
  3. Sort words in descending order:

    aspava.descending(); // Sorts the words in reverse alphabetical order
  4. Convert words to uppercase:

    aspava.upper(); // Converts all words to uppercase
  5. Convert words to lowercase:

    aspava.lower(); // Converts all words to lowercase

Using the Generator

The generator() method yields a sequence of words up to a specified maximum generation count (default is 6).

for (const word of aspava.generator(6)) {
  console.log(word);
}

Example

Here is a complete example demonstrating various functionalities of the ASPAVA:

import aspava from "npm:aspava";

// Generate 100 words, shuffle them and print each word in uppercase
for (const word of aspava.shuffle().upper().generator(100)) {
  console.log(word);
}

Conclusion

The ASPAVA is a powerful and flexible tool that can be a valuable addition to various JavaScript projects. With its easy-to-use interface and a wide range of functionalities, it opens up many possibilities for creative and practical applications.


Note: This README.md covers the basic functionalities and usage of the ASPAVA library. For more advanced use cases and customization, please ask for detailed information on GitHub.