Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@palett/fluo-vector

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@palett/fluo-vector - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

11

dist/index.cjs.js

@@ -20,6 +20,7 @@ 'use strict';

/**
*
* @typedef {{max:string,min:string,na:string}} Preset
* @param {*[]} arr
* @param {{max:string|number[],min:string|number[],na:string|number[]}} [preset]
* @param {{max:string|number[],min:string|number[],na:string|number[]}} [stringPreset]
* @param {number[]} values
* @param {Object|Preset} [preset]
* @param {Object|Preset} [stringPreset]
* @param {boolean} [mutate=true]

@@ -31,2 +32,3 @@ * @param {boolean} [colorant=false]

const fluoVector = (arr, {
values,
preset = presets.FRESH,

@@ -38,4 +40,3 @@ stringPreset = presets.JUNGLE,

} = {}) => {
let values;
if (allNAString(arr)) values = rankVector.rank(arr, comparer.STR_ASC, filter).map(x => x === -1 ? NaN : x), preset = stringPreset || preset;
if (!values && allNAString(arr)) values = rankVector.rank(arr, comparer.STR_ASC, filter), preset = stringPreset || preset;
const [mapper, zipper] = mutate ? [vector.mutate, vector.mutazip] : [vector.mapper, vector.zipper];

@@ -42,0 +43,0 @@ return utilFluo.fluoZip(arr, {

@@ -16,6 +16,7 @@ import { bound } from '@aryth/bound-vector';

/**
*
* @typedef {{max:string,min:string,na:string}} Preset
* @param {*[]} arr
* @param {{max:string|number[],min:string|number[],na:string|number[]}} [preset]
* @param {{max:string|number[],min:string|number[],na:string|number[]}} [stringPreset]
* @param {number[]} values
* @param {Object|Preset} [preset]
* @param {Object|Preset} [stringPreset]
* @param {boolean} [mutate=true]

@@ -27,2 +28,3 @@ * @param {boolean} [colorant=false]

const fluoVector = (arr, {
values,
preset = FRESH,

@@ -34,4 +36,3 @@ stringPreset = JUNGLE,

} = {}) => {
let values;
if (allNAString(arr)) values = rank(arr, STR_ASC, filter).map(x => x === -1 ? NaN : x), preset = stringPreset || preset;
if (!values && allNAString(arr)) values = rank(arr, STR_ASC, filter), preset = stringPreset || preset;
const [mapper$1, zipper$1] = mutate$1 ? [mutate, mutazip] : [mapper, zipper];

@@ -38,0 +39,0 @@ return fluoZip(arr, {

{
"name": "@palett/fluo-vector",
"version": "0.1.5",
"version": "0.1.6",
"description": "A colorant to string",

@@ -19,7 +19,7 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@aryth/bound-vector": "^0.1.4",
"@aryth/comparer": "^0.1.4",
"@aryth/rank-vector": "^0.1.4",
"@palett/presets": "^0.1.5",
"@palett/util-fluo": "^0.1.5",
"@aryth/bound-vector": "^0.1.7",
"@aryth/comparer": "^0.1.7",
"@aryth/rank-vector": "^0.1.7",
"@palett/presets": "^0.1.6",
"@palett/util-fluo": "^0.1.6",
"@typen/num-strict": "^0.1.0",

@@ -46,3 +46,3 @@ "@vect/vector": "^0.2.3"

"homepage": "https://github.com/hoyeungw/palett/fluo-vector#readme",
"gitHead": "3437b31b76722b4eeaea3c8ec42ab232e32d83a1"
"gitHead": "802b699bf231d196147a94a3d03ff5c220ac4aa7"
}

@@ -0,0 +0,0 @@ ## @palett/fluo-vector

Sorry, the diff of this file is not supported yet

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