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

sortlab

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sortlab

sortlab is a versatile sorting package that supports various data structures, such as number arrays and strings, and provides multiple popular sorting algorithms. 💪

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

Sortlab

sortlab is a versatile sorting package that supports various data structures, such as number arrays and strings, and provides multiple popular sorting algorithms.

Features

  • Supports multiple data types: Number arrays, strings, etc.
  • Multiple sorting algorithms: Insertion Sort, Selection Sort, Bubble Sort, etc.
  • Easy to use: Simple API for integrating sorting functionality into your projects.

Installation

You can install sortlab using npm:

npm install sortlab

Usage

Here are some examples of how to use sortlab in your projects:

Sorting a Number Array

const { Sorter } = require('sortlab');

const numberArray = [34, 7, 23, 32, 5, 62];

const sorterInstance = new Sorter(numberArray);

const sortedArray = sorterInstance.bubbleSort();

console.log(`Bubble Sort: ${sortedArray}`);

Sorting a String

const { Sorter } = require('sortlab');

const stringData = "sortexample";
const sorterInstance = new Sorter(stringData);

const sortedString = sorterInstance.selectionSort();
console.log(`Quick Sort: ${sortedString}`);

Supported Sorting Algorithms

  • Insertion Sort
  • Selection Sort
  • Bubble Sort
  • Quick Sort
  • More algorithms coming soon...

Contributing

We welcome contributions! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

Steps to Contribute

  • Fork the repository.
  • Create a new branch (git checkout -b feature-branch).
  • Commit your changes (git commit -am 'Add new feature').
  • Push to the branch (git push origin feature-branch).
  • Create a new Pull Request.

Keywords

sortlab

FAQs

Package last updated on 09 Jun 2024

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