☆ Basic high-level data structure library for Node.js
Basic high-level data structure library for Node.js, inspired by Java
$ npm i lucky.js --save
See the detailed API Reference.
'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
Lucky.js © Ricky 泽阳, Released under the MIT License.