0.0.4 • Published 6 years ago

lucky.js v0.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

lucky.js

Basic high-level data structure library for Node.js, inspired by Java

Travis Node Version npm Codecov

Install

$ npm i lucky.js --save

Features

  • LinkedList
  • HashMap
  • DoubleLinkedList
  • CycleLinkedList
  • BinaryTree
  • RedBlackTree
  • AVLTree
  • BTree
  • BPlusTree
  • Graph

API

See the detailed API Reference.

Example

'use strict';

const {LinkedList, HashMap} = require('lucky.js');
const linkedList = new LinkedList();
const hashMap = new HashMap();

// LinkedList
linkedList.add('one');
linkedList.add('two');
const topValue = linkedList.peek(); // one


// HashMap
hashmap.put('one', 1);
const value = hashmap.get('one'); // 1
const oldValue = hashmap.replace('one', 1); // null

Author

Lucky.js © Ricky 泽阳, Released under the MIT License.

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago