UNPKG

196 BJavaScriptView Raw
1'use strict'
2
3function insertionSort (a, b) {
4 if (a.magic > b.magic) {
5 return 1
6 } else if (a.magic < b.magic) {
7 return -1
8 } else {
9 return 0
10 }
11}
12
13module.exports = insertionSort