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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fabryscript/data-structures

v0.0.4

Published

![GitHub license](https://img.shields.io/github/license/fabryscript/alchemical) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/fabryscript/alchemical) ![GitHub last commit](https://img.shields.io/github/last-commit/fabryscript/

Downloads

25

Readme

Simple Data Structures Library (TypeScript)

GitHub license GitHub release (latest by date) GitHub last commit

A TypeScript library that provides a collection of simple data structures, designed to help you work with common data organization and manipulation tasks.

Table of Contents

Features

  • Easy-to-Use: The library offers straightforward APIs for working with data structures.
  • Type-Safe: Written in TypeScript, ensuring type safety in your code.
  • Well-Documented: Includes detailed documentation and usage examples.
  • Open Source: You can use, modify, and contribute to this library freely.

Installation

You can install this library via your package manager of choice:

npm install @fabryscript/data-structures
# or
yarn add @fabryscript/data-structures
# or
pnpm install @fabryscript/data-structures
# or
bun install @fabryscript/data-structures

Usage

import { Stack, Queue, HashTable } from '@fabryscript/data-structures';

// Create instances of data structures
const stack = new Stack();
const queue = new Queue();
const hashTable = new HashTable<number>();

// Use the data structures
stack.push(42);
queue.push('Hello, World!');
hashTable.add('John', 25);

Available Data Structures

Stack

A simple implementation of a stack data structure.

  • push(item: any): Pushes an item onto the stack.
  • pop(): any | undefined: Pops an item from the stack.
  • peek(): any | undefined: Retrieves the top item without removing it.
  • isEmpty(): boolean: Checks if the stack is empty.
  • length(): number: Returns the current length of the stack.

Queue

A simple implementation of a queue data structure.

  • push(item: any): Adds an item to the back of the queue.
  • pop(): any | undefined: Removes an item from the front of the queue.
  • peek(): any | undefined: Retrieves the front item without removing it.
  • isEmpty(): boolean: Checks if the queue is empty.
  • length(): number: Returns the current length of the queue.

HashTable

A simple implementation of a hash table data structure.

  • add(key: string, data: T): void: Adds data to the hash table.
  • get(key: string): BucketData<T>[]: Retrieves data associated with a key.
  • delete(key: string): void: Deletes data associated with a key.

Contributing

Contributions are welcome! If you have ideas for improvements or new features, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.