New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@palett/util-fluo

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@palett/util-fluo - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

74

dist/index.cjs.js

@@ -10,3 +10,3 @@ 'use strict';

const STAT_BOUND_CONFIG = {
const BOUND_CONF = {
dif: true,

@@ -85,3 +85,3 @@ level: 2

const presetToFlatDye = ({
const presetToFlat = ({
na

@@ -96,6 +96,6 @@ }) => {

*
* @param {*[]} vec
* @param {*[]} items
* @param {*[]} values
* @param {function(*[],function(*):*):*[]} mapper
* @param {function} primeDye
* @param {function} dye
* @param {{dif:number,min:number}} valueLeap

@@ -107,5 +107,5 @@ * @param {{dif:number[],min:number[]}} colorLeap

const dyeMap = (vec, {
const dyeMap = (items, {
mapper,
primeDye,
dye,
valueLeap,

@@ -118,10 +118,10 @@ colorLeap,

let blendDye;
return valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? mapper(vec, x => numStrict.isNumeric(x) ? blendDye(x) : primeDye) : mapper(vec, x => {
return valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? mapper(items, x => numStrict.isNumeric(x) ? blendDye(x) : dye) : mapper(items, x => {
var _x, _x2;
return numStrict.isNumeric(x) ? (_x = x, blendDye(x)(_x)) : (_x2 = x, primeDye(_x2));
})) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? mapper(vec, x => numStrict.isNumeric(x) ? blendDye : primeDye) : mapper(vec, x => {
return numStrict.isNumeric(x) ? (_x = x, blendDye(x)(_x)) : (_x2 = x, dye(_x2));
})) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? mapper(items, x => numStrict.isNumeric(x) ? blendDye : dye) : mapper(items, x => {
var _x3, _x4;
return numStrict.isNumeric(x) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, primeDye(_x4));
return numStrict.isNumeric(x) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, dye(_x4));
}));

@@ -132,7 +132,7 @@ };

*
* @param {*[]} keys
* @param {*[]} items
* @param {*[]} values
* @param {function(*[],function(*)):*[]} mapper
* @param {function(*[],*[],function(*,*)):*[]} zipper
* @param {function(*):string} primeDye
* @param {function(*):string} dye
* @param {{dif:number,min:number}} valueLeap

@@ -144,7 +144,6 @@ * @param {{dif:number[],min:number[]}} colorLeap

const dyeZip = (keys, {
const dyeZip = (items, {
values,
mapper,
zipper,
primeDye,
dye,
valueLeap,

@@ -156,20 +155,13 @@ colorLeap,

if (!values) return dyeMap(keys, {
mapper,
primeDye,
valueLeap,
colorLeap,
colorant
});
let blendDye;
const fn = valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? (x, v) => numStrict.isNumeric(v) ? blendDye(v) : primeDye : (x, v) => {
const fn = valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? (x, v) => numStrict.isNumeric(v) ? blendDye(v) : dye : (x, v) => {
var _x, _x2;
return numStrict.isNumeric(v) ? (_x = x, blendDye(v)(_x)) : (_x2 = x, primeDye(_x2));
}) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? (x, v) => numStrict.isNumeric(v) ? blendDye : primeDye : (x, v) => {
return numStrict.isNumeric(v) ? (_x = x, blendDye(v)(_x)) : (_x2 = x, dye(_x2));
}) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? (x, v) => numStrict.isNumeric(v) ? blendDye : dye : (x, v) => {
var _x3, _x4;
return numStrict.isNumeric(v) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, primeDye(_x4));
return numStrict.isNumeric(v) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, dye(_x4));
});
return zipper(keys, values, fn);
return zipper(items, values, fn);
};

@@ -179,3 +171,3 @@

*
* @param {*[]} keys
* @param {*[]} items
* @param {*[]} values

@@ -190,3 +182,3 @@ * @param {Function|function(*[],function(*)):*[]} mapper

const fluoZip = (keys, {
const fluo = (items, {
values,

@@ -199,11 +191,18 @@ mapper,

} = {}) => {
var _preset, _preset2;
var _preset, _preset2, _preset3, _preset4;
return dyeZip(keys, {
if (!values) return dyeMap(items, {
mapper,
dye: (_preset = preset, presetToFlat(_preset)),
colorLeap: (_preset2 = preset, presetToLeap(_preset2)),
valueLeap: bound(items, BOUND_CONF),
colorant
});
return dyeZip(items, {
values,
mapper,
zipper,
primeDye: (_preset = preset, presetToFlatDye(_preset)),
colorLeap: (_preset2 = preset, presetToLeap(_preset2)),
valueLeap: bound(values || keys, STAT_BOUND_CONFIG),
dye: (_preset3 = preset, presetToFlat(_preset3)),
colorLeap: (_preset4 = preset, presetToLeap(_preset4)),
valueLeap: bound(values, BOUND_CONF),
colorant

@@ -213,10 +212,11 @@ });

exports.BOUND_CONF = BOUND_CONF;
exports.BlendDye = BlendDye;
exports.STAT_BOUND_CONFIG = STAT_BOUND_CONFIG;
exports.dyeMap = dyeMap;
exports.dyeZip = dyeZip;
exports.fluoZip = fluoZip;
exports.fluo = fluo;
exports.fluoZip = fluo;
exports.hslToDye = hslToDye;
exports.leverage = leverage;
exports.presetToFlatDye = presetToFlatDye;
exports.presetToFlat = presetToFlat;
exports.presetToLeap = presetToLeap;

@@ -6,3 +6,3 @@ import { min, max } from '@aryth/comparer';

const STAT_BOUND_CONFIG = {
const BOUND_CONF = {
dif: true,

@@ -81,3 +81,3 @@ level: 2

const presetToFlatDye = ({
const presetToFlat = ({
na

@@ -92,6 +92,6 @@ }) => {

*
* @param {*[]} vec
* @param {*[]} items
* @param {*[]} values
* @param {function(*[],function(*):*):*[]} mapper
* @param {function} primeDye
* @param {function} dye
* @param {{dif:number,min:number}} valueLeap

@@ -103,5 +103,5 @@ * @param {{dif:number[],min:number[]}} colorLeap

const dyeMap = (vec, {
const dyeMap = (items, {
mapper,
primeDye,
dye,
valueLeap,

@@ -114,10 +114,10 @@ colorLeap,

let blendDye;
return valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? mapper(vec, x => isNumeric(x) ? blendDye(x) : primeDye) : mapper(vec, x => {
return valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? mapper(items, x => isNumeric(x) ? blendDye(x) : dye) : mapper(items, x => {
var _x, _x2;
return isNumeric(x) ? (_x = x, blendDye(x)(_x)) : (_x2 = x, primeDye(_x2));
})) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? mapper(vec, x => isNumeric(x) ? blendDye : primeDye) : mapper(vec, x => {
return isNumeric(x) ? (_x = x, blendDye(x)(_x)) : (_x2 = x, dye(_x2));
})) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? mapper(items, x => isNumeric(x) ? blendDye : dye) : mapper(items, x => {
var _x3, _x4;
return isNumeric(x) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, primeDye(_x4));
return isNumeric(x) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, dye(_x4));
}));

@@ -128,7 +128,7 @@ };

*
* @param {*[]} keys
* @param {*[]} items
* @param {*[]} values
* @param {function(*[],function(*)):*[]} mapper
* @param {function(*[],*[],function(*,*)):*[]} zipper
* @param {function(*):string} primeDye
* @param {function(*):string} dye
* @param {{dif:number,min:number}} valueLeap

@@ -140,7 +140,6 @@ * @param {{dif:number[],min:number[]}} colorLeap

const dyeZip = (keys, {
const dyeZip = (items, {
values,
mapper,
zipper,
primeDye,
dye,
valueLeap,

@@ -152,20 +151,13 @@ colorLeap,

if (!values) return dyeMap(keys, {
mapper,
primeDye,
valueLeap,
colorLeap,
colorant
});
let blendDye;
const fn = valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? (x, v) => isNumeric(v) ? blendDye(v) : primeDye : (x, v) => {
const fn = valueLeap.dif && colorLeap.dif.some(n => !!n) ? (blendDye = BlendDye(valueLeap, colorLeap), colorant ? (x, v) => isNumeric(v) ? blendDye(v) : dye : (x, v) => {
var _x, _x2;
return isNumeric(v) ? (_x = x, blendDye(v)(_x)) : (_x2 = x, primeDye(_x2));
}) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? (x, v) => isNumeric(v) ? blendDye : primeDye : (x, v) => {
return isNumeric(v) ? (_x = x, blendDye(v)(_x)) : (_x2 = x, dye(_x2));
}) : (blendDye = (_colorLeap$min = colorLeap.min, hslToDye(_colorLeap$min)), colorant ? (x, v) => isNumeric(v) ? blendDye : dye : (x, v) => {
var _x3, _x4;
return isNumeric(v) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, primeDye(_x4));
return isNumeric(v) ? (_x3 = x, blendDye(_x3)) : (_x4 = x, dye(_x4));
});
return zipper(keys, values, fn);
return zipper(items, values, fn);
};

@@ -175,3 +167,3 @@

*
* @param {*[]} keys
* @param {*[]} items
* @param {*[]} values

@@ -186,3 +178,3 @@ * @param {Function|function(*[],function(*)):*[]} mapper

const fluoZip = (keys, {
const fluo = (items, {
values,

@@ -195,11 +187,18 @@ mapper,

} = {}) => {
var _preset, _preset2;
var _preset, _preset2, _preset3, _preset4;
return dyeZip(keys, {
if (!values) return dyeMap(items, {
mapper,
dye: (_preset = preset, presetToFlat(_preset)),
colorLeap: (_preset2 = preset, presetToLeap(_preset2)),
valueLeap: bound(items, BOUND_CONF),
colorant
});
return dyeZip(items, {
values,
mapper,
zipper,
primeDye: (_preset = preset, presetToFlatDye(_preset)),
colorLeap: (_preset2 = preset, presetToLeap(_preset2)),
valueLeap: bound(values || keys, STAT_BOUND_CONFIG),
dye: (_preset3 = preset, presetToFlat(_preset3)),
colorLeap: (_preset4 = preset, presetToLeap(_preset4)),
valueLeap: bound(values, BOUND_CONF),
colorant

@@ -209,2 +208,2 @@ });

export { BlendDye, STAT_BOUND_CONFIG, dyeMap, dyeZip, fluoZip, hslToDye, leverage, presetToFlatDye, presetToLeap };
export { BOUND_CONF, BlendDye, dyeMap, dyeZip, fluo, fluo as fluoZip, hslToDye, leverage, presetToFlat, presetToLeap };
{
"name": "@palett/util-fluo",
"version": "0.1.6",
"version": "0.1.7",
"description": "A colorant to string",

@@ -18,5 +18,5 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@aryth/comparer": "^0.1.7",
"@palett/convert": "^0.1.6",
"@palett/dye": "^0.1.6",
"@aryth/comparer": "^0.1.9",
"@palett/convert": "^0.1.7",
"@palett/dye": "^0.1.7",
"@typen/num-strict": "^0.1.0"

@@ -42,3 +42,3 @@ },

"homepage": "https://github.com/hoyeungw/palett/util-fluo#readme",
"gitHead": "802b699bf231d196147a94a3d03ff5c220ac4aa7"
"gitHead": "08919265b1eb16e7de3219b0d1c45c680f91ca5d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc