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

swiss-ak

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swiss-ak - npm Package Compare versions

Comparing version 1.10.1 to 1.10.2

1

dist/index.d.ts

@@ -331,3 +331,2 @@ /**

maxWidth: number;
chalk: any;
wrapperFn: any;

@@ -334,0 +333,0 @@ showCount: boolean;

171

dist/index.js

@@ -291,2 +291,84 @@ var __defProp = Object.defineProperty;

});
// src/tools/higherOrder.ts
var higherOrder_exports = {};
__export(higherOrder_exports, {
asc: () => asc,
byProp: () => byProp,
combine: () => combine,
combineProp: () => combineProp,
desc: () => desc,
everys: () => everys,
exists: () => exists,
filters: () => filters,
isAllEqual: () => isAllEqual,
isEmpty: () => isEmpty,
isEqual: () => isEqual,
isFalsy: () => isFalsy,
isNotEmpty: () => isNotEmpty,
isNotEqual: () => isNotEqual,
isTruthy: () => isTruthy,
maps: () => maps,
noact: () => noact,
noop: () => noop,
reduces: () => reduces,
result: () => result,
sorts: () => sorts,
toBool: () => toBool,
toNumber: () => toNumber,
toProp: () => toProp,
toString: () => toString
});
var noop = () => {
};
var noact = (item) => item;
var result = (item) => () => item;
var exists = (item) => item !== void 0 && item !== null;
var isTruthy = (item) => Boolean(item);
var isFalsy = (item) => !Boolean(item);
var isEmpty = (item) => Boolean(!item || !item.length);
var isNotEmpty = (item) => Boolean(item && item.length);
var isEqual = (item) => (other) => Boolean(item === other);
var isNotEqual = (item) => (other) => Boolean(item !== other);
var filters = {
exists,
isTruthy,
isFalsy,
isEmpty,
isNotEmpty,
isEqual,
isNotEqual
};
var toString = (item) => item + "";
var toNumber = (item) => Number(item);
var toBool = (item) => item !== "false" && Boolean(item);
var toProp = (prop) => (item) => item && item[prop];
var maps = {
toString,
toNumber,
toBool,
toProp
};
var asc = (a, b) => Number(a) - Number(b);
var desc = (a, b) => Number(b) - Number(a);
var byProp = (propName, sortFn = asc) => {
return (a, b) => sortFn(a[propName], b[propName]);
};
var sorts = {
asc,
desc,
byProp
};
var combine = (a, b) => a + b;
var combineProp = (propName) => (a, b) => a[propName] + b[propName];
var reduces = {
combine,
combineProp
};
var isAllEqual = (val, i, arr) => val === arr[0];
var everys = {
isAllEqual
};
// src/tools/progressBar.ts
var printLn = (...text) => {

@@ -310,3 +392,3 @@ var _a, _b;

};
var print = (text, wrapperFn = noWrap) => {
var print = (text, wrapperFn = noact) => {
const wrapped = wrapperFn(text || "");

@@ -316,7 +398,7 @@ printLn(wrapped);

var getBarString = (current, max, width, opts) => {
const { progChar, emptyChar, startChar, endChar, chalk } = opts;
const { progChar, emptyChar, startChar, endChar } = opts;
const numProgChars = Math.round(width * (Math.max(0, Math.min(current / max, 1)) / 1));
const numEmptyChars = width - numProgChars;
const body = `${progChar.repeat(numProgChars)}${emptyChar.repeat(numEmptyChars)}`;
return `${chalk.dim(startChar)}${chalk.bold(body)}${chalk.dim(endChar)}`;
return `${startChar}${body}${endChar}`;
};

@@ -342,4 +424,3 @@ var getSuffix = (current, max, opts) => {

maxWidth: ((_a = process == null ? void 0 : process.stdout) == null ? void 0 : _a.columns) ? process.stdout.columns : 100,
chalk: noChalk,
wrapperFn: noWrap,
wrapperFn: noact,
showCount: true,

@@ -407,82 +488,2 @@ showPercent: false,

// src/tools/higherOrder.ts
var higherOrder_exports = {};
__export(higherOrder_exports, {
asc: () => asc,
byProp: () => byProp,
combine: () => combine,
combineProp: () => combineProp,
desc: () => desc,
everys: () => everys,
exists: () => exists,
filters: () => filters,
isAllEqual: () => isAllEqual,
isEmpty: () => isEmpty,
isEqual: () => isEqual,
isFalsy: () => isFalsy,
isNotEmpty: () => isNotEmpty,
isNotEqual: () => isNotEqual,
isTruthy: () => isTruthy,
maps: () => maps,
noact: () => noact,
noop: () => noop,
reduces: () => reduces,
result: () => result,
sorts: () => sorts,
toBool: () => toBool,
toNumber: () => toNumber,
toProp: () => toProp,
toString: () => toString
});
var noop = () => {
};
var noact = (item) => item;
var result = (item) => () => item;
var exists = (item) => item !== void 0 && item !== null;
var isTruthy = (item) => Boolean(item);
var isFalsy = (item) => !Boolean(item);
var isEmpty = (item) => Boolean(!item || !item.length);
var isNotEmpty = (item) => Boolean(item && item.length);
var isEqual = (item) => (other) => Boolean(item === other);
var isNotEqual = (item) => (other) => Boolean(item !== other);
var filters = {
exists,
isTruthy,
isFalsy,
isEmpty,
isNotEmpty,
isEqual,
isNotEqual
};
var toString = (item) => item + "";
var toNumber = (item) => Number(item);
var toBool = (item) => item !== "false" && Boolean(item);
var toProp = (prop) => (item) => item && item[prop];
var maps = {
toString,
toNumber,
toBool,
toProp
};
var asc = (a, b) => Number(a) - Number(b);
var desc = (a, b) => Number(b) - Number(a);
var byProp = (propName, sortFn = asc) => {
return (a, b) => sortFn(a[propName], b[propName]);
};
var sorts = {
asc,
desc,
byProp
};
var combine = (a, b) => a + b;
var combineProp = (propName) => (a, b) => a[propName] + b[propName];
var reduces = {
combine,
combineProp
};
var isAllEqual = (val, i, arr) => val === arr[0];
var everys = {
isAllEqual
};
// src/tools/errorHandling.ts

@@ -489,0 +490,0 @@ var tryOr = async (orValue, func, ...args) => {

{
"name": "swiss-ak",
"version": "1.10.1",
"version": "1.10.2",
"author": "Jack Cannon <jackc@annon.co.uk> (http://c.annon.co.uk/)",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

import { noChalk, noWrap } from './fakeChalk';
import * as fn from './higherOrder';

@@ -43,3 +43,3 @@ /**

const print = (text?: string, wrapperFn: any = noWrap) => {
const print = (text?: string, wrapperFn: any = fn.noact) => {
const wrapped = wrapperFn(text || '');

@@ -50,3 +50,3 @@ printLn(wrapped);

const getBarString = (current: number, max: number, width: number, opts: ProgressBarOptionsFull) => {
const { progChar, emptyChar, startChar, endChar, chalk } = opts;
const { progChar, emptyChar, startChar, endChar } = opts;
const numProgChars = Math.round(width * (Math.max(0, Math.min(current / max, 1)) / 1));

@@ -56,3 +56,3 @@ const numEmptyChars = width - numProgChars;

return `${chalk.dim(startChar)}${chalk.bold(body)}${chalk.dim(endChar)}`;
return `${startChar}${body}${endChar}`;
};

@@ -78,3 +78,2 @@

maxWidth: number;
chalk: any;
wrapperFn: any;

@@ -94,4 +93,3 @@ showCount: boolean;

maxWidth: process?.stdout?.columns ? process.stdout.columns : 100,
chalk: noChalk,
wrapperFn: noWrap,
wrapperFn: fn.noact,
showCount: true,

@@ -98,0 +96,0 @@ showPercent: false,

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