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

@vanillaes/computer-science

v2.0.4

Published

Algorithms and Data Structures implemented in modern JS

Downloads

47

Readme

A collection of Computer Science algorithms and data structures implemented using bleeding-edge JavaScript features and capabilities

Algorithms and data structures are essential foundations if you ever want to advance in the professional development world. The goal of this library is to provide a modern Javascript specific reference to study and experiment with a wide range of general purpose algorithms and data structures. This is by-no-means the first JS lib of its kind but it is the first that is 100% dedicated to using modern JS practices and patterns.

Modern Javascript

ECMAScript standards have come a long way in the past 5 years (ie ES2015 - ES2020) but it will take a lot of time for the rest of the greater JS ecosystem to catch up. This library is a 'clean room' implementation, written from scratch to use modern practices by default.

For Example:

  • all modules ES modules
  • index.js define the public API
  • no build-tooling required
  • classes are used liberally
  • [Symbol.iterator] definitions for data structures
  • cross-browser compatibility is a low priority
  • in Node.js this package loads as type=module

That means...

Not only does this package provide a useful reference for Computer Science principles but it also works as a reference for Modern JS best-practices.

Imports

This package works isomorphically in browsers and server-side JavaScript runtimes

Browsers

Import directly from the local path or a CDN

<script type="module">
import { LinkedList } from 'path/to/computer-science/index.js'
</script>

The minified version can be imported from

<script type="module">
import { LinkedList } from 'path/to/computer-science/index.min.js'
</script>

Node

Install the package

npm install @vanillaes/absurdum

Import from the installed module

import { LinkedList } from '@vanillaes/computer-science';

API Documentation

Data Structures

Disjoint-Set

Disjoint sets are used to determine the connectivity within a graph by grouping vertices into unique sets.

Linear

Linear data structures get their name because they are typically used to map 1-to-1 relationships between data elements in a one-dimensional fashion.

Set

A set represents a collection of unique values.

Misc

Algorithms

Related Materials