array-order
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -11,2 +11,10 @@ <!-- markdownlint-disable MD022 MD024 MD026 MD032 MD041 --> | ||
## [0.8.0] - 2020-04-25 | ||
### Added | ||
- heap permutations | ||
- more tests with permutations | ||
### Changed | ||
- simplified sort | ||
## [0.7.0] - 2017-03-19 | ||
@@ -13,0 +21,0 @@ ### Changed |
{ | ||
"name": "array-order", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"type": "module", | ||
"description": "sort an array in-place to a preset order", | ||
@@ -13,9 +14,8 @@ "keywords": [ | ||
"author": "Hugo Villeneuve", | ||
"main": "./index.js", | ||
"dependencies": {}, | ||
"main": "./sort.js", | ||
"devDependencies": { | ||
"cotest": "^2.1.0" | ||
"@types/node": "^13.13.2" | ||
}, | ||
"scripts": { | ||
"test": "node test" | ||
"test": "node ./tst/test-heap && node ./tst/test-sort" | ||
}, | ||
@@ -26,7 +26,3 @@ "repository": { | ||
}, | ||
"private": false, | ||
"license": "MIT", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
"license": "MIT" | ||
} |
@@ -7,2 +7,4 @@ <!-- markdownlint-disable MD004 MD007 MD010 MD012 MD041 MD022 MD024 MD032 MD036 --> | ||
## example | ||
```javascript | ||
@@ -16,6 +18,12 @@ var arrayOrder = require('array-order'), | ||
The function will throw if the lengths don't match or if the order contains duplicate (`[0,2,0]`) or invalid (`[9,'a',3]`) indices | ||
## other exported utils | ||
the following are needed for testing and are also available | ||
* `array-order/heap.js` creates a function that generates every permutations `(a:Array) => () => a:Array` | ||
* `array-order/swap.js` in place swap of 2 items `(a:Array, i:number, j:number) => a:Array` | ||
* `array-order/shift.js` in place left-swap from i to j `(a:Array, i:number, j:number) => a:Array` | ||
## License | ||
[MIT](http://www.opensource.org/licenses/MIT) © [Hugo Villeneuve](https://github.com/hville) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5358
14
146
28
Yes
1