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

sortrjs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sortrjs

This is a package for all sorting algorithms in javascript.

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

SORTRJS

Package that houses various sorting algorithms for the consumption of engineers who do not want to go through the stress of writing their own sorting algorithms from scratch.

All available algorithms are usable as methods of this package.

Firstly, install sortr. npm install sortrjs

You can hence import sortr into your codebase.

const sortr = require('sortrjs').default;

// to use Merge Sort for example, you can write it as follows
const sortedArray = sortr.merge.sort([43, 12, 54, 1, 3, 2, 98])
console.log(sortedArray) // [1, 2, 3, 12, 43, 54, 98]

Contribution Guidelines

Part of the major goals of this project apart from makeing algorithms accessible, is to encourage beginners and first-timers to contribute to open source projects.

Below are the guidelines for

Getting Started

  • Read this step by step guide to get your code into this repository

  • Pick a sorting algorithm you would like to add, make sure no one has written it.

  • Create a new file in the src directory <SORTING_ALGORITHM_NAME>/index.js. Eg. quick/index.js make sure the sorting algorithm hasn't been written already

  • create a new file to write your tests <SORTING_ALGORITHM_NAME>.spec.js e.g quick.test.js

  • I wrote bubble/index.js and bubble.spec.js feel free to use it as a template

Contributors

Keywords

sortr

FAQs

Package last updated on 01 Jul 2023

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