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

next-core-structures

v2.6.1

Published

The Augmented.js Next - Structures.

Downloads

145

Readme

next-core-structures

Augmented.js Next Core - Structures

API

Table of Contents

Stack

Stack - Standard Stack data structure

Parameters

  • options object Options to pass

empty

The empty method clears the stack

peek

The peek method returns the first in the stack

Returns object Returns the first object in the stack

pop

The pop method returns and removes the first in the stack

Returns object Returns the first object in the stack

push

The push method adds to the stack

Parameters

  • item object The item to push to the stack

search

The search method returns where in the stack an item exists

Parameters

  • item

Returns number Returns the index of the item

size

The size method returns the size of the stack

Returns number Returns the size of the stack

clear

The clear method clears the stack

toArray

The toArray method returns the stack as an array

Returns array Returns the stack as an array

toString

The toString method returns the stack as an string

Returns string Returns the stack as an string

AugmentedMap

ES6-like Map - than can marshall

Parameters

  • myData {object} Map data to fill map

set

Set the value by key in the map

Parameters

  • key string name of the key
  • value any value for the key

get

Get the value by key in the map

Parameters

Returns any The value for the key

indexOf

Index of the key in the map

Parameters

Returns number index of the key

remove

Remove the value by key in the map

Parameters

has

Has returns whether a key exists in the map

Parameters

Returns boolean true if the key exists in the map

forEach

Iterator forEach key to value in the map

Parameters

key

Get the key for the index in the map

Parameters

Returns object the key at index

entries

The entries value object in the map

Returns array Array of entries value objects

values

The values in the map as an Array

Returns array values as an Array

clear

Clear the map

size

The size of the map in keys

Returns number size of map by keys

toJSON

Represent the map in JSON

Returns object JSON of the map

toString

Represent the map in a String of JSON

Returns string Stringified JSON of the map

isEmpty

Checks of the map is empty (not ES6)

Returns boolean true if the map is empty

marshall

Marshalls a map dataToMarshall must be the following type of data to parse: JSON object with properties (key/value)

Parameters

  • dataToMarshall Augmented.Utility.Map Data to marshall as a map

Returns boolean Returns true on success

AsynchronousQueue

AsynchronousQueue - An Async queue for handling async chained functions

Parameters

  • timeout number The timout period for each process in the queue (optional)

add

Add method for adding processes to the queue

Parameters

  • args ...any

clear

Clear all processes in the queue

process

Process the queue

Parameters

  • args ...any

timeout

Get the timeout for the queue

queue

Get the full queue