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 - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

test/linked-list.coffee

2

package.json
{
"name": "eter",
"version": "0.0.3",
"version": "0.0.4",
"description": "Lightweight collections for JavaScript",

@@ -5,0 +5,0 @@ "author": "Keyvan Akbary <kiwwito@gmail.com>",

# Eter
Lightweight collections for JavaScript.
[![Build Status](https://secure.travis-ci.org/keyvanakbary/eter.svg?branch=master)](http://travis-ci.org/keyvanakbary/eter)
*Éter* is a conglomerate of lightweight collections for JavaScript running on [node](http://nodejs.org/) and browser.
## Usage
For node, [install the package](https://www.npmjs.org/package/eter) and include it
```javascript
var eter = require('eter');
```
For the browser, just include the modules you want
```html
<script src="build/stack.js"></script>
```
## Collections
### Stack
```javascript
var s = new eter.Stack();
s.pushAll([1, 2, 3]);
s.toArray();//[3, 2, 1]
s.pop();//3
s.toArray();//[2, 1]
```
### Queue
```javascript
var q = new eter.Queue();
q.enqueueAll([1, 2, 3]);
q.toArray();//[1, 2, 3]
q.remove();//1
q.toArray();//[2, 3]
```
### LinkedList
```javascript
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
```

Sorry, the diff of this file is not supported yet

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