@vect/vector-update
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -5,17 +5,4 @@ 'use strict'; | ||
/** | ||
* Insert element at current(c) position to projected(previous(n)) position. | ||
* s.t. p <= c | ||
*/ | ||
var swap = require('@vect/swap'); | ||
const insertDown = function (c, p) { | ||
const t = this[c]; | ||
while (c > p) this[c] = this[--c]; // moves backward | ||
return this[p] = t; | ||
}; | ||
const partition = (vec, indexes, hi) => { | ||
@@ -26,3 +13,3 @@ hi = hi || indexes.length; | ||
nx; | ||
const insertion = insertDown.bind(vec); | ||
const insertion = swap.insertDown.bind(vec); | ||
@@ -29,0 +16,0 @@ while (++i < hi) if ((nx = indexes[i]) !== ++cu) insertion(nx, cu); |
@@ -1,16 +0,3 @@ | ||
/** | ||
* Insert element at current(c) position to projected(previous(n)) position. | ||
* s.t. p <= c | ||
*/ | ||
import { insertDown } from '@vect/swap'; | ||
const insertDown = function (c, p) { | ||
const t = this[c]; | ||
while (c > p) this[c] = this[--c]; // moves backward | ||
return this[p] = t; | ||
}; | ||
const partition = (vec, indexes, hi) => { | ||
@@ -17,0 +4,0 @@ hi = hi || indexes.length; |
{ | ||
"name": "@vect/vector-update", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A math util library", | ||
@@ -17,2 +17,5 @@ "main": "dist/index.cjs.js", | ||
}, | ||
"dependencies": { | ||
"@vect/swap": "^0.2.3" | ||
}, | ||
"repository": { | ||
@@ -33,3 +36,3 @@ "type": "git", | ||
"homepage": "https://github.com/hoyeungw/vect#readme", | ||
"gitHead": "2548485b4d33272c4175da8792f3847e5b1d6ee3" | ||
"gitHead": "505907940ae303dc83b2c1c3a7d8a58b08287c08" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4730
1
41
+ Added@vect/swap@^0.2.3
+ Added@vect/swap@0.2.13(transitive)