@palett/fluo-matrix
Advanced tools
Comparing version 0.1.7 to 0.2.0
@@ -6,2 +6,4 @@ 'use strict'; | ||
var presets = require('@palett/presets'); | ||
var enumMatrixDirections = require('@vect/enum-matrix-directions'); | ||
var fluoVector = require('@palett/fluo-vector'); | ||
var matrix = require('@vect/matrix'); | ||
@@ -13,11 +15,4 @@ var boundMatrix = require('@aryth/bound-matrix'); | ||
var numStrict = require('@typen/num-strict'); | ||
var fluoVector = require('@palett/fluo-vector'); | ||
var vector = require('@vect/vector'); | ||
const allString = mx => matrix.every(mx, x => typeof x === 'string'); | ||
const someNumeric = mx => matrix.some(mx, numStrict.isNumeric); | ||
const allNAString = mx => !someNumeric(mx) && allString(mx); | ||
/** | ||
@@ -49,7 +44,13 @@ * | ||
const allString = mx => matrix.every(mx, x => typeof x === 'string'); | ||
const someNumeric = mx => matrix.some(mx, numStrict.isNumeric); | ||
const allNAString = mx => !someNumeric(mx) && allString(mx); | ||
/** | ||
* | ||
* @param {*[][]} mx | ||
* @param {Object} [preset] | ||
* @param {Object} [stringPreset] | ||
* @param {Object|Preset} [preset] | ||
* @param {Object|Preset} [stringPreset] | ||
* @param {boolean} [mutate=true] | ||
@@ -89,3 +90,3 @@ * @param {boolean} [colorant=false] | ||
const fluoMatrix = (mx, { | ||
direct = matrix.POINTWISE, | ||
direct = enumMatrixDirections.POINTWISE, | ||
preset = presets.FRESH, | ||
@@ -98,3 +99,3 @@ stringPreset = presets.JUNGLE, | ||
switch (direct) { | ||
case matrix.ROWWISE: | ||
case enumMatrixDirections.ROWWISE: | ||
return fluoRows(mx, { | ||
@@ -108,3 +109,3 @@ preset, | ||
case matrix.COLUMNWISE: | ||
case enumMatrixDirections.COLUMNWISE: | ||
return fluoColumns(mx, { | ||
@@ -118,3 +119,3 @@ preset, | ||
case matrix.POINTWISE: | ||
case enumMatrixDirections.POINTWISE: | ||
default: | ||
@@ -146,3 +147,3 @@ let values; | ||
const fluo = (mx, { | ||
direct = matrix.ROWWISE, | ||
direct = enumMatrixDirections.ROWWISE, | ||
preset = presets.FRESH, | ||
@@ -154,11 +155,3 @@ stringPreset = presets.JUNGLE, | ||
switch (direct) { | ||
case matrix.POINTWISE: | ||
return fluoMatrix(mx, { | ||
preset, | ||
stringPreset, | ||
mutate, | ||
colorant | ||
}); | ||
case matrix.ROWWISE: | ||
case enumMatrixDirections.ROWWISE: | ||
return fluoRows(mx, { | ||
@@ -171,3 +164,3 @@ preset, | ||
case matrix.COLUMNWISE: | ||
case enumMatrixDirections.COLUMNWISE: | ||
return fluoColumns(mx, { | ||
@@ -180,2 +173,3 @@ preset, | ||
case enumMatrixDirections.POINTWISE: | ||
default: | ||
@@ -182,0 +176,0 @@ return fluoMatrix(mx, { |
import { FRESH, JUNGLE } from '@palett/presets'; | ||
import { some, every, columnsMapper, transpose, POINTWISE, COLUMNWISE, ROWWISE, mutate as mutate$1, mutazip, mapper as mapper$1, zipper } from '@vect/matrix'; | ||
import { POINTWISE, COLUMNWISE, ROWWISE } from '@vect/enum-matrix-directions'; | ||
import { fluoVector } from '@palett/fluo-vector'; | ||
import { columnsMapper, transpose, some, every, mutate as mutate$1, mutazip, mapper as mapper$1, zipper } from '@vect/matrix'; | ||
import { bound } from '@aryth/bound-matrix'; | ||
@@ -8,11 +10,4 @@ import { STR_ASC } from '@aryth/comparer'; | ||
import { isNumeric } from '@typen/num-strict'; | ||
import { fluoVector } from '@palett/fluo-vector'; | ||
import { mutate, mapper } from '@vect/vector'; | ||
const allString = mx => every(mx, x => typeof x === 'string'); | ||
const someNumeric = mx => some(mx, isNumeric); | ||
const allNAString = mx => !someNumeric(mx) && allString(mx); | ||
/** | ||
@@ -44,7 +39,13 @@ * | ||
const allString = mx => every(mx, x => typeof x === 'string'); | ||
const someNumeric = mx => some(mx, isNumeric); | ||
const allNAString = mx => !someNumeric(mx) && allString(mx); | ||
/** | ||
* | ||
* @param {*[][]} mx | ||
* @param {Object} [preset] | ||
* @param {Object} [stringPreset] | ||
* @param {Object|Preset} [preset] | ||
* @param {Object|Preset} [stringPreset] | ||
* @param {boolean} [mutate=true] | ||
@@ -144,10 +145,2 @@ * @param {boolean} [colorant=false] | ||
switch (direct) { | ||
case POINTWISE: | ||
return fluoMatrix(mx, { | ||
preset, | ||
stringPreset, | ||
mutate, | ||
colorant | ||
}); | ||
case ROWWISE: | ||
@@ -169,2 +162,3 @@ return fluoRows(mx, { | ||
case POINTWISE: | ||
default: | ||
@@ -171,0 +165,0 @@ return fluoMatrix(mx, { |
{ | ||
"name": "@palett/fluo-matrix", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "A colorant to string", | ||
@@ -19,11 +19,12 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@aryth/bound-matrix": "^0.1.9", | ||
"@aryth/comparer": "^0.1.9", | ||
"@aryth/rank-matrix": "^0.1.9", | ||
"@palett/fluo-vector": "^0.1.7", | ||
"@palett/presets": "^0.1.7", | ||
"@palett/util-fluo": "^0.1.7", | ||
"@typen/num-strict": "^0.1.0", | ||
"@vect/matrix": "^0.2.3", | ||
"@vect/vector": "^0.2.3" | ||
"@aryth/bound-matrix": "^0.1.12", | ||
"@aryth/comparer": "^0.1.12", | ||
"@aryth/rank-matrix": "^0.1.12", | ||
"@palett/fluo-vector": "^0.2.0", | ||
"@palett/presets": "^0.2.0", | ||
"@palett/util-fluo": "^0.2.0", | ||
"@typen/num-strict": "^0.1.3", | ||
"@vect/enum-matrix-directions": "^0.2.4", | ||
"@vect/matrix": "^0.2.4", | ||
"@vect/vector": "^0.2.4" | ||
}, | ||
@@ -48,3 +49,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/palett/fluo-matrix#readme", | ||
"gitHead": "08919265b1eb16e7de3219b0d1c45c680f91ca5d" | ||
"gitHead": "acea3e999df4d67303b6d04c7b713849a943b74c" | ||
} |
@@ -0,0 +0,0 @@ ## @palett/fluo-matrix |
Sorry, the diff of this file is not supported yet
11712
10
311
+ Added@aryth/bound-vector@0.2.14(transitive)
+ Added@aryth/comparer@0.2.14(transitive)
+ Added@aryth/math@0.2.14(transitive)
+ Added@aryth/rand@0.2.14(transitive)
+ Added@aryth/rank-vector@0.2.14(transitive)
+ Added@aryth/util-bound@0.2.14(transitive)
+ Added@ject/oneself@0.0.6(transitive)
+ Added@palett/cards@0.2.16(transitive)
+ Added@palett/convert@0.2.16(transitive)
+ Added@palett/dye@0.2.16(transitive)
+ Added@palett/fluo-vector@0.2.16(transitive)
+ Added@palett/presets@0.2.16(transitive)
+ Added@palett/projector@0.2.16(transitive)
+ Added@palett/toner-hsl@0.2.16(transitive)
+ Added@palett/util-ansi@0.2.16(transitive)
+ Added@palett/util-fluo@0.2.16(transitive)
+ Added@spare/string-value@0.8.16(transitive)
- Removed@aryth/rank-vector@0.1.14(transitive)
- Removed@palett/cards@0.1.7(transitive)
- Removed@palett/convert@0.1.7(transitive)
- Removed@palett/dye@0.1.7(transitive)
- Removed@palett/fluo-vector@0.1.7(transitive)
- Removed@palett/presets@0.1.7(transitive)
- Removed@palett/util-ansi@0.1.7(transitive)
- Removed@palett/util-fluo@0.1.7(transitive)
- Removedaryth@0.0.5(transitive)
- Removedtypen@0.1.11(transitive)
Updated@aryth/bound-matrix@^0.1.12
Updated@aryth/comparer@^0.1.12
Updated@aryth/rank-matrix@^0.1.12
Updated@palett/fluo-vector@^0.2.0
Updated@palett/presets@^0.2.0
Updated@palett/util-fluo@^0.2.0
Updated@typen/num-strict@^0.1.3
Updated@vect/matrix@^0.2.4
Updated@vect/vector@^0.2.4