Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: make-github-pseudonymous-again/js-sorting
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.0
Choose a base ref
...
head repository: make-github-pseudonymous-again/js-sorting
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.0.0
Choose a head ref

Commits on Nov 15, 2016

  1. Copy the full SHA
    0a9e7bf View commit details
  2. Merge pull request #49 from aureooms/greenkeeper-nyc-9.0.1

    Update nyc to version 9.0.1 🚀
    Aurélien Ooms authored Nov 15, 2016
    Copy the full SHA
    cf09011 View commit details

Commits on Nov 17, 2016

  1. Copy the full SHA
    4ad1aa5 View commit details
  2. Merge pull request #50 from aureooms/greenkeeper-ava-0.17.0

    Update ava to version 0.17.0 🚀
    Aurélien Ooms authored Nov 17, 2016
    Copy the full SHA
    2eac6f5 View commit details

Commits on Nov 22, 2016

  1. Copy the full SHA
    46d8f08 View commit details
  2. Merge pull request #51 from aureooms/greenkeeper-nyc-10.0.0

    Update nyc to version 10.0.0 🚀
    Aurélien Ooms authored Nov 22, 2016
    Copy the full SHA
    cbbc43c View commit details

Commits on Dec 25, 2016

  1. Copy the full SHA
    db56892 View commit details
  2. Merge pull request #52 from aureooms/greenkeeper-esdoc-0.5.0

    Update esdoc to version 0.5.0 🚀
    Aurélien Ooms authored Dec 25, 2016
    Copy the full SHA
    e75829b View commit details

Commits on Jan 26, 2017

  1. Update README.md

    Aurélien Ooms authored Jan 26, 2017
    Copy the full SHA
    e17e55e View commit details
  2. Update README.md

    Aurélien Ooms authored Jan 26, 2017
    Copy the full SHA
    b8504aa View commit details

Commits on Feb 3, 2017

  1. Copy the full SHA
    71ab89b View commit details
  2. Merge pull request #54 from aureooms/greenkeeper/ava-0.18.1

    Update ava to the latest version 🚀
    Aurélien Ooms authored Feb 3, 2017
    Copy the full SHA
    f8c1abb View commit details

Commits on Feb 16, 2017

  1. Copy the full SHA
    0986695 View commit details
  2. Copy the full SHA
    e886306 View commit details
  3. Copy the full SHA
    dc9ff10 View commit details
  4. Copy the full SHA
    9234198 View commit details
  5. Copy the full SHA
    b3184a2 View commit details

Commits on Feb 21, 2017

  1. Copy the full SHA
    c8ea238 View commit details

Commits on Apr 5, 2017

  1. Copy the full SHA
    e653209 View commit details
  2. Merge pull request #60 from aureooms/greenkeeper/ava-0.19.0

    Update ava to the latest version 🚀
    Aurélien Ooms authored Apr 5, 2017
    Copy the full SHA
    7194228 View commit details

Commits on Apr 10, 2017

  1. Copy the full SHA
    68012f8 View commit details
  2. Merge pull request #61 from aureooms/greenkeeper/ava-0.19.1

    chore(package): update ava to version 0.19.1
    Aurélien Ooms authored Apr 10, 2017
    Copy the full SHA
    3cdef57 View commit details

Commits on Apr 27, 2017

  1. Copy the full SHA
    5311fbc View commit details

Commits on Jun 2, 2017

  1. Copy the full SHA
    22c92d9 View commit details
  2. Merge pull request #63 from aureooms/greenkeeper/nyc-11.0.1

    Update nyc to the latest version 🚀
    Aurélien Ooms authored Jun 2, 2017
    Copy the full SHA
    9f7e5f6 View commit details

Commits on Sep 17, 2020

  1. Copy the full SHA
    f2f0017 View commit details

Commits on Sep 20, 2020

  1. Copy the full SHA
    062b652 View commit details
  2. Copy the full SHA
    99e0578 View commit details
  3. Copy the full SHA
    e66f04c View commit details
  4. Copy the full SHA
    022ec75 View commit details
  5. Copy the full SHA
    29ac5a8 View commit details
  6. Copy the full SHA
    985be30 View commit details
  7. Copy the full SHA
    12c5a8f View commit details
  8. Copy the full SHA
    7dc8c21 View commit details
  9. Copy the full SHA
    b4ef86f View commit details
  10. Copy the full SHA
    a8b6c25 View commit details
  11. Copy the full SHA
    efeda2a View commit details
  12. Copy the full SHA
    f639467 View commit details
  13. Copy the full SHA
    b6b99a7 View commit details
  14. Copy the full SHA
    1d88e19 View commit details
  15. Copy the full SHA
    5fc4918 View commit details
  16. Copy the full SHA
    ee041a9 View commit details
  17. Copy the full SHA
    d399320 View commit details
  18. Copy the full SHA
    99befe1 View commit details
  19. Copy the full SHA
    e13532b View commit details
  20. Copy the full SHA
    03f74ef View commit details
  21. Copy the full SHA
    c408e82 View commit details
  22. Copy the full SHA
    0309e9e View commit details
  23. Copy the full SHA
    6eb9dc6 View commit details
  24. Copy the full SHA
    80f257e View commit details
6 changes: 6 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
languages:
JavaScript: true
exclude_paths:
- "doc/**"
- "lib/**"
- "test/**"
6 changes: 3 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languages:
JavaScript: true
exclude_paths:
- "doc/**/*.js"
- "test/**/*.js"
- "lib/**/*.js"
- "doc/**"
- "lib/**"
- "test/**"
55 changes: 55 additions & 0 deletions .esdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"source": "./src",
"destination": "./gh-pages",
"debug": false,
"index": "./README.md",
"package": "./package.json",
"plugins": [
{
"name": "esdoc-inject-script-plugin",
"option": {
"enable": true,
"scripts": [
"./doc/scripts/header.js"
]
}
},
{
"name": "esdoc-inject-style-plugin",
"option": {
"enable": true,
"styles": [
"./doc/css/style.css"
]
}
},
{
"name": "esdoc-standard-plugin",
"option": {
"accessor": {
"access": [
"public",
"protected",
"private"
],
"autoPrivate": true
},
"brand": {
"title": "@aureooms/js-sort"
},
"test": {
"type": "ava",
"source": "./test/src"
},
"manual": {
"files": [
"./doc/manual/overview.md",
"./doc/manual/installation.md",
"./doc/manual/usage.md",
"./doc/manual/example.md"
]
}
}
}
]
}
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# lock file
!yarn.lock

# Generated files
/lib

# Dependency directory
node_modules
jspm_packages

# Coverage directory used by nyc
coverage
.nyc_output
/coverage
/.nyc_output

# Documentation
gh-pages
/gh-pages
23 changes: 10 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
env:
- CXX=g++-4.8

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

language: node_js

node_js:
@@ -16,10 +6,17 @@ node_js:
install:
- npm install

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

script:
- npm run cover
- npm run travis

after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

after_success:
- bash <(curl -s https://codecov.io/bash) || true
- bash <(curl -s https://codecov.io/bash) || true
- coveralls < coverage/lcov.info || true
- codeclimate-test-reporter < coverage/lcov.info || true
82 changes: 55 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,69 @@
[js-sort](http://aureooms.github.io/js-sort)
:signal_strength: [@aureooms/js-sort](https://make-github-pseudonymous-again.github.io/js-sort)
==

Sorting algorithms for JavaScript. Parent is
[aureooms/js-algo](https://github.com/aureooms/js-algo).
<p align="center">
<a href="https://xkcd.com/1185">
<img src="https://imgs.xkcd.com/comics/ineffective_sorts.png" width="600">
</a><br/>
© <a href="https://xkcd.com">xkcd.com</a>
</p>

Sorting algorithms for JavaScript.
See [docs](https://make-github-pseudonymous-again.github.io/js-sort).
Parent is [@aureooms/js-algorithms](https://github.com/make-github-pseudonymous-again/js-algorithms).

> :building_construction: Caveat emptor! This is work in progress. Code may be
> working. Documentation may be present. Coherence may be. Maybe.
```js
let fordjohnson = sort._fordjohnson( search.binarysearch ) ;
import {isSorted} from '@comparison-sorting/is-sorted';
import {increasing, decreasing} from '@total-order/primitive';
isSorted(increasing, [1, 2, 3], 0, 3); // true
isSorted(decreasing, [1, 2, 3], 0, 3); // false
```

[![NPM license](http://img.shields.io/npm/l/aureooms-js-sort.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-sort/master/LICENSE)
[![NPM version](http://img.shields.io/npm/v/aureooms-js-sort.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-sort)
[![Build Status](http://img.shields.io/travis/aureooms/js-sort.svg?style=flat)](https://travis-ci.org/aureooms/js-sort)
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-sort.svg?style=flat)](https://coveralls.io/r/aureooms/js-sort)
[![Dependencies Status](http://img.shields.io/david/aureooms/js-sort.svg?style=flat)](https://david-dm.org/aureooms/js-sort#info=dependencies)
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-sort.svg?style=flat)](https://david-dm.org/aureooms/js-sort#info=devDependencies)
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-sort.svg?style=flat)](https://codeclimate.com/github/aureooms/js-sort)
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-sort.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-sort)
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-sort.svg?style=flat)](https://github.com/aureooms/js-sort/issues)
[![Documentation](https://aureooms.github.io/js-sort/badge.svg)](https://aureooms.github.io/js-sort/source.html)
[![License](https://img.shields.io/github/license/make-github-pseudonymous-again/js-sort.svg)](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-sort/master/LICENSE)
[![Version](https://img.shields.io/npm/v/@aureooms/js-sort.svg)](https://www.npmjs.org/package/@aureooms/js-sort)
[![Build](https://img.shields.io/travis/make-github-pseudonymous-again/js-sort/master.svg)](https://travis-ci.org/make-github-pseudonymous-again/js-sort/branches)
[![Dependencies](https://img.shields.io/david/make-github-pseudonymous-again/js-sort.svg)](https://david-dm.org/make-github-pseudonymous-again/js-sort)
[![Dev dependencies](https://img.shields.io/david/dev/make-github-pseudonymous-again/js-sort.svg)](https://david-dm.org/make-github-pseudonymous-again/js-sort?type=dev)
[![GitHub issues](https://img.shields.io/github/issues/make-github-pseudonymous-again/js-sort.svg)](https://github.com/make-github-pseudonymous-again/js-sort/issues)
[![Downloads](https://img.shields.io/npm/dm/@aureooms/js-sort.svg)](https://www.npmjs.org/package/@aureooms/js-sort)

## Children
[![Code issues](https://img.shields.io/codeclimate/issues/make-github-pseudonymous-again/js-sort.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-sort/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/make-github-pseudonymous-again/js-sort.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-sort/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/make-github-pseudonymous-again/js-sort/master.svg)](https://codecov.io/gh/make-github-pseudonymous-again/js-sort)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/make-github-pseudonymous-again/js-sort.svg)](https://codeclimate.com/github/make-github-pseudonymous-again/js-sort/trends/technical_debt)
[![Documentation](https://make-github-pseudonymous-again.github.io/js-sort//badge.svg)](https://make-github-pseudonymous-again.github.io/js-sort//source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@aureooms/js-sort)](https://bundlephobia.com/result?p=@aureooms/js-sort)

## :baby: Children

This package has several children:

- [aureooms/js-bucketsort](https://github.com/aureooms/js-bucketsort): bucketsort for JavaScript
- [aureooms/js-countingsort](https://github.com/aureooms/js-countingsort): countingsort for JavaScript
- [aureooms/js-in-situ-sort-spec](https://github.com/aureooms/js-in-situ-sort-spec): in place sorting for JavaScript
- [aureooms/js-heapsort](https://github.com/aureooms/js-heapsort): heapsort for JavaScript
- [aureooms/js-quicksort](https://github.com/aureooms/js-quicksort): quicksort for JavaScript
- [aureooms/js-mergesort](https://github.com/aureooms/js-mergesort): mergesort for JavaScript
- [aureooms/js-merging](https://github.com/aureooms/js-merging): merging for JavaScript
- [aureooms/js-partition](https://github.com/aureooms/js-partition): partition for JavaScript
- [aureooms/js-radixsort](https://github.com/aureooms/js-radixsort): radixsort for JavaScript
- [aureooms/js-selection](https://github.com/aureooms/js-selection): selection for JavaScript
- [aureooms/js-odd-even-mergesort](https://github.com/aureooms/js-odd-even-mergesort): Batcher's odd-even mergesort for JavaScript
### :balance_scale: Comparison sorting

- :notebook_with_decorative_cover: [aureooms/js-in-situ-sort-spec](https://github.com/make-github-pseudonymous-again/js-in-situ-sort-spec): in place sorting for JavaScript
- :leaves: [aureooms/js-heapsort](https://github.com/make-github-pseudonymous-again/js-heapsort): heapsort for JavaScript
- :rabbit2: [aureooms/js-quicksort](https://github.com/make-github-pseudonymous-again/js-quicksort): quicksort for JavaScript
- :rewind: [aureooms/js-insertion-sort](https://github.com/make-github-pseudonymous-again/js-insertion-sort): Insertion sorting algorithms for JavaScript
- :person_fencing: [aureooms/js-merge-insertion-sort](https://github.com/make-github-pseudonymous-again/js-merge-insertion-sort): Ford-Johnson algorithm for JavaScript
- :dragon: [aureooms/js-mergesort](https://github.com/make-github-pseudonymous-again/js-mergesort): mergesort for JavaScript
- :musical_score: [aureooms/js-odd-even-mergesort](https://github.com/make-github-pseudonymous-again/js-odd-even-mergesort): Batcher's odd-even mergesort for JavaScript

#### Subroutines

- :waning_gibbous_moon: [aureooms/js-merging](https://github.com/make-github-pseudonymous-again/js-merging): merging for JavaScript
- :cake: [aureooms/js-partition](https://github.com/make-github-pseudonymous-again/js-partition): partition for JavaScript
- :point_down: [aureooms/js-selection](https://github.com/make-github-pseudonymous-again/js-selection): selection for JavaScript

### :zzz: Integer sorting

- :oden: [aureooms/js-radix-sort](https://github.com/make-github-pseudonymous-again/js-radix-sort): Radix sorting algorithms for JavaScript
- [aureooms/js-countingsort](https://github.com/make-github-pseudonymous-again/js-countingsort): countingsort for JavaScript
- [aureooms/js-bucketsort](https://github.com/make-github-pseudonymous-again/js-bucketsort): bucketsort for JavaScript


## Reference
## :link: Links

- http://sorting.at
25 changes: 9 additions & 16 deletions doc/manual/example.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
# Examples
```js
import array from "aureooms-js-array" ;
import search from "aureooms-js-search" ;
import compare from "aureooms-js-compare" ;

let fordjohnson = function ( compare , a , i , j ) {

sort._fordjohnson( search.binarysearch )( compare , array.swap , a , i , j ) ;

} ;
import {selectionsort} from '@aureooms/js-sort' ;
import {increasing, decreasing} from '@total-order/primitive';
import {isSorted} from '@comparison-sorting/is-sorted';

let a = [ 1 , 6 , 5 , 3 , 2 , 4 ] ;

fordjohnson( compare.increasing , a , 0 , a.length ) ;
selectionsort( increasing , a , 0 , a.length ) ;

a ; // [ 1 , 2 , 3 , 4 , 5 , 6 ]
isSorted(increasing, a, 0, a.length); // true

fordjohnson( compare.decreasing , a , 0 , a.length ) ;
selectionsort( decreasing , a , 0 , a.length ) ;

a ; // [ 6 , 5 , 4 , 3 , 2 , 1 ]
isSorted(decreasing, a, 0, a.length); // true

// but also

/** insertionsort */
let insertionsort = sort.insertionsort ;
/** selectionsort */
let selectionsort = sort.selectionsort ;
/** bubblesort */
let bubblesort = sort.bubblesort ;
import {bubblesort} from '@aureooms/js-sort' ;
```
5 changes: 3 additions & 2 deletions doc/manual/installation.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Installation
Can be managed using
[jspm](http://jspm.io)
or [npm](https://github.com/npm/npm).

### jspm
```terminal
jspm install npm:aureooms-js-sort
jspm install npm:@aureooms/js-sort
```

### npm
```terminal
npm install aureooms-js-sort --save
npm install @aureooms/js-sort --save
```
1 change: 1 addition & 0 deletions doc/manual/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Overview
11 changes: 6 additions & 5 deletions doc/manual/usage.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Usage
The code needs a ES2015+ polyfill to work, for example
[babel-polyfill](https://babeljs.io/docs/usage/polyfill).
[regenerator-runtime/runtime](https://babeljs.io/docs/usage/polyfill).
```js
require( 'babel-polyfill' ) ;
require( 'regenerator-runtime/runtime' ) ;
// or
import 'babel-polyfill' ;
import 'regenerator-runtime/runtime' ;
```

Then
```js
const measure = require( 'aureooms-js-sort' ) ;
const measure = require( '@aureooms/js-sort' ) ;
// or
import measure from 'aureooms-js-sort' ;
import measure from '@aureooms/js-sort' ;
```
2 changes: 1 addition & 1 deletion doc/scripts/header.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ domReady(function(){
header.insertBefore(projectname,header.firstChild);

var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
testlink.href = 'https://coveralls.io/github/aureooms/js-sort' ;
testlink.href = 'https://coveralls.io/github/make-github-pseudonymous-again/js-sort' ;
testlink.target = '_BLANK' ;

var searchBox = document.querySelector('.search-box');
37 changes: 0 additions & 37 deletions esdoc.json

This file was deleted.

30 changes: 0 additions & 30 deletions lib/index.js

This file was deleted.

Loading