@aryth/bound-vector
Advanced tools
Comparing version 0.3.7 to 0.3.10
@@ -57,4 +57,2 @@ 'use strict'; | ||
const parseNumeric = x => +x; | ||
/** | ||
@@ -76,3 +74,3 @@ * | ||
const duobound = function (words, [configX = {}, configY = {}] = []) { | ||
const duobound = function (words, [configX, configY] = []) { | ||
const l = words === null || words === void 0 ? void 0 : words.length; | ||
@@ -82,6 +80,10 @@ let vecX = undefined, | ||
if (!l) return [vecX, vecY]; | ||
const filterX = configX.filter, | ||
mapperX = configX.mapper; | ||
const filterY = configY.filter, | ||
mapperY = configY.mapper; | ||
const { | ||
filter: filterX, | ||
mapper: mapperX | ||
} = configX, | ||
{ | ||
filter: filterY, | ||
mapper: mapperY | ||
} = configY; | ||
iterate(words, (v, i) => { | ||
@@ -134,16 +136,14 @@ var _vecX, _vecY; | ||
* @param {*[]} words | ||
* @param {Config} [opt] | ||
* @param {Config} [config] | ||
* @return {?BoundedVector} | ||
*/ | ||
const solebound = function (words, opt) { | ||
var _opt$filter, _opt$mapper; | ||
const solebound = function (words, config) { | ||
const l = words === null || words === void 0 ? void 0 : words.length; | ||
/** @type {?BoundedVector} */ | ||
let vec = undefined; | ||
if (!l) return vec; | ||
const filter = (_opt$filter = opt === null || opt === void 0 ? void 0 : opt.filter) !== null && _opt$filter !== void 0 ? _opt$filter : numeral.isNumeric, | ||
mapper = (_opt$mapper = opt === null || opt === void 0 ? void 0 : opt.mapper) !== null && _opt$mapper !== void 0 ? _opt$mapper : parseNumeric; | ||
const { | ||
filter, | ||
mapper | ||
} = config; | ||
iterate(words, (v, i) => { | ||
@@ -150,0 +150,0 @@ var _vec; |
@@ -53,4 +53,2 @@ import { IsNum, boundOutput, ToNum } from '@aryth/util-bound'; | ||
const parseNumeric = x => +x; | ||
/** | ||
@@ -72,3 +70,3 @@ * | ||
const duobound = function (words, [configX = {}, configY = {}] = []) { | ||
const duobound = function (words, [configX, configY] = []) { | ||
const l = words === null || words === void 0 ? void 0 : words.length; | ||
@@ -78,6 +76,10 @@ let vecX = undefined, | ||
if (!l) return [vecX, vecY]; | ||
const filterX = configX.filter, | ||
mapperX = configX.mapper; | ||
const filterY = configY.filter, | ||
mapperY = configY.mapper; | ||
const { | ||
filter: filterX, | ||
mapper: mapperX | ||
} = configX, | ||
{ | ||
filter: filterY, | ||
mapper: mapperY | ||
} = configY; | ||
iterate(words, (v, i) => { | ||
@@ -130,16 +132,14 @@ var _vecX, _vecY; | ||
* @param {*[]} words | ||
* @param {Config} [opt] | ||
* @param {Config} [config] | ||
* @return {?BoundedVector} | ||
*/ | ||
const solebound = function (words, opt) { | ||
var _opt$filter, _opt$mapper; | ||
const solebound = function (words, config) { | ||
const l = words === null || words === void 0 ? void 0 : words.length; | ||
/** @type {?BoundedVector} */ | ||
let vec = undefined; | ||
if (!l) return vec; | ||
const filter = (_opt$filter = opt === null || opt === void 0 ? void 0 : opt.filter) !== null && _opt$filter !== void 0 ? _opt$filter : isNumeric, | ||
mapper = (_opt$mapper = opt === null || opt === void 0 ? void 0 : opt.mapper) !== null && _opt$mapper !== void 0 ? _opt$mapper : parseNumeric; | ||
const { | ||
filter, | ||
mapper | ||
} = config; | ||
iterate(words, (v, i) => { | ||
@@ -146,0 +146,0 @@ var _vec; |
{ | ||
"name": "@aryth/bound-vector", | ||
"version": "0.3.7", | ||
"version": "0.3.10", | ||
"description": "A math util library", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@aryth/util-bound": "^0.3.7", | ||
"@aryth/util-bound": "^0.3.10", | ||
"@ject/oneself": "^0.0.6", | ||
@@ -41,3 +41,3 @@ "@spare/string-value": "^0.10.14", | ||
"homepage": "https://github.com/hoyeungw/aryth#readme", | ||
"gitHead": "d0ab19ca01867037f451ba070815833e5e0c72d1" | ||
"gitHead": "10e562e31e7307a5988e893892d8a13614b4dc6a" | ||
} |
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
413
0
16921
Updated@aryth/util-bound@^0.3.10