New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eter

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eter

Lightweight collections for JavaScript

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
Maintainers
1
Weekly downloads
 
Created
Source

Eter

Build Status

Éter is a conglomerate of lightweight collections for JavaScript running on node and browser.

Usage

For node, install the package and include it

var eter = require('eter');

For the browser, just include the modules you want

<script src="build/stack.js"></script>

Collections

Stack

var s = new eter.Stack();

s.pushAll([1, 2, 3]);
s.toArray();//[3, 2, 1]

s.pop();//3
s.toArray();//[2, 1]

Queue

var q = new eter.Queue();

q.enqueueAll([1, 2, 3]);
q.toArray();//[1, 2, 3]

q.remove();//1
q.toArray();//[2, 3]

LinkedList

var l = new eter.LinkedList();

l.addAll([1, 2, 3]);
l.toArray();//[1, 2, 3]

l.get(2);//3

l.insert(1, 2);
l.toArray();//[1, 2, 2, 3]

l.remove();
l.toArray();//[2, 2, 3]

l.contains(2);//true

FAQs

Package last updated on 18 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc