This package has been deprecated

Author message:

This package is no longer being maintained.

@charlesstover/quicksort
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Quicksort Tweet

An implementation of Quicksort in JavaScript.

A walkthrough of the logic behind Quicksort and development of this package can be found on the Medium article Implementing Quicksort in JavaScript.

version minified size minzipped size downloads build

Install

  • npm install @charlesstover/quicksort --save or
  • yarn add @charlesstover/quicksort

Examples

import quickSort from '@charlesstover/quicksort';
import { expect } from 'chai';

describe('Quicksort', () => {
  it('should sort an array', () => {
    const unsorted = [ 5, 4, 1, 3, 2 ];
    const sorted = quickSort(unsorted);
    expect(sorted).to.deep.equal([ 1, 2, 3, 4, 5 ]);
  });
});

/@charlesstover/quicksort/

    Package Sidebar

    Install

    npm i @charlesstover/quicksort

    Weekly Downloads

    6

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.12 kB

    Total Files

    5

    Last publish

    Collaborators

    • charlesstover