doubly

Doubly linked list in TypeScript

Usage no npm install needed!

<script type="module">
  import doubly from 'https://cdn.skypack.dev/doubly';
</script>

README

Name

Description

Installation

npm i --save dualy

Usage

Supports both ESM and CommonJS

// esm
import Doubly from 'doubly`
// commonjs
const Doubly = require('doubly').default

Methods

at(index: number)

const list = new Doubly()
list.push(100)
list.at(0) // 100
list.at(-1) // LinklyError: At negative index not supported

concat(list: Doubly)

// push
const list = new Linkly()
list.push(100)
list.push(200)
list.push(300)

const list2 = new Linkly()
list.push(400)
list.push(500)
list.push(600)

const list3 = list.concat()

... TODO

License

MIT