https://github.com/onesy-me/linked-list
Linked list
https://github.com/onesy-me/linked-list
browser javascript linked-list linkedlist nodejs typescript
Last synced: about 2 months ago
JSON representation
Linked list
- Host: GitHub
- URL: https://github.com/onesy-me/linked-list
- Owner: onesy-me
- License: mit
- Created: 2022-12-22T00:53:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-11T23:28:04.000Z (6 months ago)
- Last Synced: 2025-04-07T22:35:49.094Z (about 2 months ago)
- Topics: browser, javascript, linked-list, linkedlist, nodejs, typescript
- Language: TypeScript
- Homepage: https://docs.onesy.me/library/linked-list
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
onesy Linked list
Linked list
MIT license
Production ready
UMD 1.3kb gzipped
100% test cov
Browser and Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
## Getting started
### Add
```sh
yarn add @onesy/linked-list
```### Use cases
- Implementation of stacks
- Efficient removal of elements
- Reduced memory fragmentation
- etc.### Use
```javascript
import OnesyLinkedList from '@onesy/linked-list';// Make a new linked list instance
const onesyLinkedList = new OnesyLinkedList();// Add values
onesyLinkedList.add(1).add(4);onesyLinkedList.first;
// 1onesyLinkedList.last;
// 4const value = onesyLinkedList.search(4);
// OnesyNode { value: 4, ... }onesyLinkedList.remove(1);
onesyLinkedList.first;
// 4onesyLinkedList.length;
// 1
```### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```### Prod
Build
```sh
yarn build
```