New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ds-javascript/doubly-linked-list

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ds-javascript/doubly-linked-list

This is Doubly Linked list Data structure in javascript

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@ds-javascript/doubly-linked-list

Usage

const DoublyLinkedList = require('@ds-javascript/doubly-linked-list');
const list = new DoublyLinkedList();

API

.push(value) adds a node of the given value at the end of the list.

list.push('node value');

.pop() removes node from end of the list.

list.pop();

.shift() removes a node from beginning of the list.

list.shift();

.unshift(value) adds a node of the given value at the beginning of the list.

list.unshift('node value');

.get(index) get node at the provided index of the list.

list.get(1);

.set(value,index) set/update value of node at the provided index of the list.

list.set('node value',1);

.insert(value,index) insert node at the provided index of the list.

list.insert('node value',1);

.remove(index) delete node from provided index of the list.

list.remove(1);

.getList() get entire list

list.getList();

Keywords

javascript ds

FAQs

Package last updated on 01 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts