@aryth/bound-matrix
Advanced tools
Comparing version 0.3.19 to 0.3.20
@@ -31,3 +31,3 @@ 'use strict'; | ||
/** @type {{dif: boolean, level: number}} */ | ||
const config = this !== null && this !== void 0 ? this : { | ||
const config = this ?? { | ||
dif: true, | ||
@@ -92,10 +92,6 @@ level: enumCheckLevels.LOOSE | ||
matrixMapper.iterate(wordx, (v, i, j) => { | ||
var _matX, _matY; | ||
if (filterX(v) && ((_matX = matX) !== null && _matX !== void 0 ? _matX : matX = matrixInit.iso(h, w, undefined))) { | ||
var _matX$max; | ||
if (filterX(v) && (matX ?? (matX = matrixInit.iso(h, w, undefined)))) { | ||
v = mapperX(v); | ||
if (v > ((_matX$max = matX.max) !== null && _matX$max !== void 0 ? _matX$max : matX.max = matX.min = v)) { | ||
if (v > (matX.max ?? (matX.max = matX.min = v))) { | ||
matX.max = v; | ||
@@ -109,8 +105,6 @@ } else if (v < matX.min) { | ||
if (filterY(v) && ((_matY = matY) !== null && _matY !== void 0 ? _matY : matY = matrixInit.iso(h, w, undefined))) { | ||
var _matY$max; | ||
if (filterY(v) && (matY ?? (matY = matrixInit.iso(h, w, undefined)))) { | ||
v = mapperY(v); | ||
if (v > ((_matY$max = matY.max) !== null && _matY$max !== void 0 ? _matY$max : matY.max = matY.min = v)) { | ||
if (v > (matY.max ?? (matY.max = matY.min = v))) { | ||
matY.max = v; | ||
@@ -156,10 +150,6 @@ } else if (v < matY.min) { | ||
matrixMapper.iterate(wordx, (v, i, j) => { | ||
var _mx; | ||
if (filter(v) && ((_mx = mx) !== null && _mx !== void 0 ? _mx : mx = matrixInit.iso(height, width, undefined))) { | ||
var _mx$max; | ||
if (filter(v) && (mx ?? (mx = matrixInit.iso(height, width, undefined)))) { | ||
v = mapper(v); | ||
if (v > ((_mx$max = mx.max) !== null && _mx$max !== void 0 ? _mx$max : mx.max = mx.min = v)) { | ||
if (v > (mx.max ?? (mx.max = mx.min = v))) { | ||
mx.max = v; | ||
@@ -203,12 +193,8 @@ } else if (v < mx.min) { | ||
}, k) => { | ||
var _mx; | ||
let mx = matrixCollection[k]; | ||
if (filter(v) && ((_mx = mx) !== null && _mx !== void 0 ? _mx : mx = matrixCollection[k] = matrixInit.iso(h, w, undefined))) { | ||
var _mx$max; | ||
if (filter(v) && (mx ?? (mx = matrixCollection[k] = matrixInit.iso(h, w, undefined)))) { | ||
v = mapper(v); | ||
if (v > ((_mx$max = mx.max) !== null && _mx$max !== void 0 ? _mx$max : mx.max = mx.min = v)) { | ||
if (v > (mx.max ?? (mx.max = mx.min = v))) { | ||
mx.max = v; | ||
@@ -247,7 +233,5 @@ } else if (v < mx.min) { | ||
if (count === 1) { | ||
var _x$filter, _x$mapper; | ||
const [x] = configs; | ||
const filter = (_x$filter = x === null || x === void 0 ? void 0 : x.filter) !== null && _x$filter !== void 0 ? _x$filter : numeral.isNumeric, | ||
mapper = (_x$mapper = x === null || x === void 0 ? void 0 : x.mapper) !== null && _x$mapper !== void 0 ? _x$mapper : numeral.parseNum; | ||
const filter = (x == null ? void 0 : x.filter) ?? numeral.isNumeric, | ||
mapper = (x == null ? void 0 : x.mapper) ?? numeral.parseNum; | ||
return [solebound(wordx, { | ||
@@ -260,9 +244,7 @@ filter, | ||
if (count === 2) { | ||
var _x$filter2, _x$mapper2, _y$filter, _y$mapper; | ||
const [x, y] = configs; | ||
const fX = (_x$filter2 = x === null || x === void 0 ? void 0 : x.filter) !== null && _x$filter2 !== void 0 ? _x$filter2 : numeral.isNumeric, | ||
mX = (_x$mapper2 = x === null || x === void 0 ? void 0 : x.mapper) !== null && _x$mapper2 !== void 0 ? _x$mapper2 : numeral.parseNum; | ||
const fY = (_y$filter = y === null || y === void 0 ? void 0 : y.filter) !== null && _y$filter !== void 0 ? _y$filter : literal.hasLiteral, | ||
mY = (_y$mapper = y === null || y === void 0 ? void 0 : y.mapper) !== null && _y$mapper !== void 0 ? _y$mapper : stringValue.stringValue; | ||
const fX = (x == null ? void 0 : x.filter) ?? numeral.isNumeric, | ||
mX = (x == null ? void 0 : x.mapper) ?? numeral.parseNum; | ||
const fY = (y == null ? void 0 : y.filter) ?? literal.hasLiteral, | ||
mY = (y == null ? void 0 : y.mapper) ?? stringValue.stringValue; | ||
return duobound(wordx, [{ | ||
@@ -269,0 +251,0 @@ filter: fX, |
@@ -27,3 +27,3 @@ import { bound as bound$1 } from '@aryth/bound-vector'; | ||
/** @type {{dif: boolean, level: number}} */ | ||
const config = this !== null && this !== void 0 ? this : { | ||
const config = this ?? { | ||
dif: true, | ||
@@ -88,10 +88,6 @@ level: LOOSE | ||
iterate(wordx, (v, i, j) => { | ||
var _matX, _matY; | ||
if (filterX(v) && ((_matX = matX) !== null && _matX !== void 0 ? _matX : matX = iso(h, w, undefined))) { | ||
var _matX$max; | ||
if (filterX(v) && (matX ?? (matX = iso(h, w, undefined)))) { | ||
v = mapperX(v); | ||
if (v > ((_matX$max = matX.max) !== null && _matX$max !== void 0 ? _matX$max : matX.max = matX.min = v)) { | ||
if (v > (matX.max ?? (matX.max = matX.min = v))) { | ||
matX.max = v; | ||
@@ -105,8 +101,6 @@ } else if (v < matX.min) { | ||
if (filterY(v) && ((_matY = matY) !== null && _matY !== void 0 ? _matY : matY = iso(h, w, undefined))) { | ||
var _matY$max; | ||
if (filterY(v) && (matY ?? (matY = iso(h, w, undefined)))) { | ||
v = mapperY(v); | ||
if (v > ((_matY$max = matY.max) !== null && _matY$max !== void 0 ? _matY$max : matY.max = matY.min = v)) { | ||
if (v > (matY.max ?? (matY.max = matY.min = v))) { | ||
matY.max = v; | ||
@@ -152,10 +146,6 @@ } else if (v < matY.min) { | ||
iterate(wordx, (v, i, j) => { | ||
var _mx; | ||
if (filter(v) && ((_mx = mx) !== null && _mx !== void 0 ? _mx : mx = iso(height, width, undefined))) { | ||
var _mx$max; | ||
if (filter(v) && (mx ?? (mx = iso(height, width, undefined)))) { | ||
v = mapper(v); | ||
if (v > ((_mx$max = mx.max) !== null && _mx$max !== void 0 ? _mx$max : mx.max = mx.min = v)) { | ||
if (v > (mx.max ?? (mx.max = mx.min = v))) { | ||
mx.max = v; | ||
@@ -199,12 +189,8 @@ } else if (v < mx.min) { | ||
}, k) => { | ||
var _mx; | ||
let mx = matrixCollection[k]; | ||
if (filter(v) && ((_mx = mx) !== null && _mx !== void 0 ? _mx : mx = matrixCollection[k] = iso(h, w, undefined))) { | ||
var _mx$max; | ||
if (filter(v) && (mx ?? (mx = matrixCollection[k] = iso(h, w, undefined)))) { | ||
v = mapper(v); | ||
if (v > ((_mx$max = mx.max) !== null && _mx$max !== void 0 ? _mx$max : mx.max = mx.min = v)) { | ||
if (v > (mx.max ?? (mx.max = mx.min = v))) { | ||
mx.max = v; | ||
@@ -243,7 +229,5 @@ } else if (v < mx.min) { | ||
if (count === 1) { | ||
var _x$filter, _x$mapper; | ||
const [x] = configs; | ||
const filter = (_x$filter = x === null || x === void 0 ? void 0 : x.filter) !== null && _x$filter !== void 0 ? _x$filter : isNumeric, | ||
mapper = (_x$mapper = x === null || x === void 0 ? void 0 : x.mapper) !== null && _x$mapper !== void 0 ? _x$mapper : parseNum; | ||
const filter = (x == null ? void 0 : x.filter) ?? isNumeric, | ||
mapper = (x == null ? void 0 : x.mapper) ?? parseNum; | ||
return [solebound(wordx, { | ||
@@ -256,9 +240,7 @@ filter, | ||
if (count === 2) { | ||
var _x$filter2, _x$mapper2, _y$filter, _y$mapper; | ||
const [x, y] = configs; | ||
const fX = (_x$filter2 = x === null || x === void 0 ? void 0 : x.filter) !== null && _x$filter2 !== void 0 ? _x$filter2 : isNumeric, | ||
mX = (_x$mapper2 = x === null || x === void 0 ? void 0 : x.mapper) !== null && _x$mapper2 !== void 0 ? _x$mapper2 : parseNum; | ||
const fY = (_y$filter = y === null || y === void 0 ? void 0 : y.filter) !== null && _y$filter !== void 0 ? _y$filter : hasLiteral, | ||
mY = (_y$mapper = y === null || y === void 0 ? void 0 : y.mapper) !== null && _y$mapper !== void 0 ? _y$mapper : stringValue; | ||
const fX = (x == null ? void 0 : x.filter) ?? isNumeric, | ||
mX = (x == null ? void 0 : x.mapper) ?? parseNum; | ||
const fY = (y == null ? void 0 : y.filter) ?? hasLiteral, | ||
mY = (y == null ? void 0 : y.mapper) ?? stringValue; | ||
return duobound(wordx, [{ | ||
@@ -265,0 +247,0 @@ filter: fX, |
{ | ||
"name": "@aryth/bound-matrix", | ||
"version": "0.3.19", | ||
"version": "0.3.20", | ||
"description": "A math util library", | ||
@@ -18,12 +18,12 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@aryth/bound-vector": "^0.3.19", | ||
"@aryth/util-bound": "^0.3.19", | ||
"@ject/oneself": "^0.0.11", | ||
"@texting/string-value": "^0.0.9", | ||
"@aryth/bound-vector": "^0.3.20", | ||
"@aryth/util-bound": "^0.3.20", | ||
"@ject/oneself": "^0.0.12", | ||
"@texting/string-value": "^0.0.10", | ||
"@typen/enum-check-levels": "^0.1.16", | ||
"@typen/literal": "^0.1.16", | ||
"@typen/numeral": "^0.1.16", | ||
"@vect/matrix-init": "^0.3.9", | ||
"@vect/matrix-mapper": "^0.3.9", | ||
"@vect/matrix-size": "^0.3.9" | ||
"@vect/matrix-init": "^0.3.10", | ||
"@vect/matrix-mapper": "^0.3.10", | ||
"@vect/matrix-size": "^0.3.10" | ||
}, | ||
@@ -45,3 +45,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/aryth#readme", | ||
"gitHead": "577f88905f3e56b09bdd5680ecc8d91d68697931" | ||
"gitHead": "227c4f9de2905851b0b403453942fe4c3a3ea01a" | ||
} |
15592
439
+ Added@ject/oneself@0.0.12(transitive)
+ Added@texting/string-value@0.0.10(transitive)
- Removed@ject/oneself@0.0.11(transitive)
- Removed@texting/string-value@0.0.9(transitive)
Updated@aryth/bound-vector@^0.3.20
Updated@aryth/util-bound@^0.3.20
Updated@ject/oneself@^0.0.12
Updated@vect/matrix-init@^0.3.10
Updated@vect/matrix-mapper@^0.3.10
Updated@vect/matrix-size@^0.3.10