Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dsacjs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsacjs - npm Package Compare versions

Comparing version 0.0.1-test to 0.0.2-test

dist/Algorithms/binarySearch.js

30

dist/dataStructures/SingleLinkedList.js

@@ -23,3 +23,7 @@ "use strict";

}
prepend(value) {
peek() {
var _a, _b;
return (_b = (_a = this.head) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
}
addFirst(value) {
const newNode = new ListNode(value);

@@ -36,3 +40,3 @@ if (this.isEmpty()) {

}
append(value) {
addLast(value) {
const newNode = new ListNode(value);

@@ -94,11 +98,27 @@ if (this.isEmpty()) {

let current = this.head;
let listValues = "";
const listValues = [];
while (current) {
listValues += `${current.value} -> `;
listValues.push(current.value);
current = current.next;
}
listValues += "null";
this.logger.info(listValues);
}
printReverse() {
if (this.isEmpty()) {
return this.logger.info("List is empty");
}
let current = this.head;
const listValues = [];
while (current) {
listValues.unshift(current.value);
current = current.next;
}
this.logger.info(listValues);
}
clear() {
this.head = null;
this.tail = null;
this.size = 0;
}
}
exports.default = SingleLinkedList;

@@ -6,4 +6,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SingleLinkedList = void 0;
exports.binarySearch = exports.Logger = exports.LinkedList = exports.Queue = exports.Stack = exports.SingleLinkedList = void 0;
const binarySearch_1 = __importDefault(require("./Algorithms/binarySearch"));
exports.binarySearch = binarySearch_1.default;
const DoublyLinkedList_1 = __importDefault(require("./dataStructures/DoublyLinkedList"));
exports.LinkedList = DoublyLinkedList_1.default;
const Queue_1 = __importDefault(require("./dataStructures/Queue"));
exports.Queue = Queue_1.default;
const SingleLinkedList_1 = __importDefault(require("./dataStructures/SingleLinkedList"));
exports.SingleLinkedList = SingleLinkedList_1.default;
const Stack_1 = __importDefault(require("./dataStructures/Stack"));
exports.Stack = Stack_1.default;
const Logger_1 = __importDefault(require("./lib/Logger"));
exports.Logger = Logger_1.default;

2

package.json
{
"name": "dsacjs",
"version": "0.0.1-test",
"version": "0.0.2-test",
"description": "A high-performance JavaScript and TypeScript library offering a comprehensive set of efficient data structures. Simplify your algorithm implementation and data manipulation with optimized, easy-to-use tools.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -0,1 +1,3 @@

# IN DEVELOPMENT
# DsacJs - Data Structures - Algorithm - Toolkit Collection

@@ -2,0 +4,0 @@

@@ -13,8 +13,11 @@ declare class ListNode<T = any> {

isEmpty(): boolean;
prepend(value: T): void;
append(value: T): void;
peek(): T | null;
addFirst(value: T): void;
addLast(value: T): void;
removeFirst(): T | null;
removeLast(): T | null;
print(): void;
printReverse(): void;
clear(): void;
}
export {};

@@ -0,2 +1,7 @@

import binarySearch from "./Algorithms/binarySearch";
import DoublyLinkedList from "./dataStructures/DoublyLinkedList";
import Queue from "./dataStructures/Queue";
import SingleLinkedList from "./dataStructures/SingleLinkedList";
export { SingleLinkedList };
import Stack from "./dataStructures/Stack";
import Logger from "./lib/Logger";
export { SingleLinkedList, Stack, Queue, DoublyLinkedList as LinkedList, Logger, binarySearch, };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc