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

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 23.4.0 to 24.0.0

4

dist/cjs/augments/error.js

@@ -55,5 +55,5 @@ "use strict";

exports.ensureErrorAndPrependMessage = ensureErrorAndPrependMessage;
function wrapInTry(inputs) {
function wrapInTry(callback, inputs) {
try {
const returnValue = inputs.callback();
const returnValue = callback();
if (returnValue instanceof Promise) {

@@ -60,0 +60,0 @@ return returnValue.catch((error) => {

@@ -54,3 +54,2 @@ "use strict";

__exportStar(require("./augments/string/suffixes"), exports);
__exportStar(require("./augments/string/url"), exports);
__exportStar(require("./augments/string/uuid"), exports);

@@ -57,0 +56,0 @@ __exportStar(require("./augments/time"), exports);

@@ -47,5 +47,5 @@ import { isTruthy } from './boolean';

}
export function wrapInTry(inputs) {
export function wrapInTry(callback, inputs) {
try {
const returnValue = inputs.callback();
const returnValue = callback();
if (returnValue instanceof Promise) {

@@ -52,0 +52,0 @@ return returnValue.catch((error) => {

@@ -38,3 +38,2 @@ export * from './augments/ansi';

export * from './augments/string/suffixes';
export * from './augments/string/url';
export * from './augments/string/uuid';

@@ -41,0 +40,0 @@ export * from './augments/time';

@@ -12,10 +12,8 @@ import { RequireExactlyOne } from 'type-fest';

export declare function ensureErrorAndPrependMessage(maybeError: unknown, prependMessage: string): Error;
export type TryWrapInputs<CallbackReturn, FallbackReturn> = {
callback: () => CallbackReturn;
} & RequireExactlyOne<{
export type TryWrapConfig<FallbackReturn> = RequireExactlyOne<{
fallbackValue: FallbackReturn;
catchCallback: (error: unknown) => FallbackReturn;
}>;
export declare function wrapInTry<CallbackReturn, FallbackReturn>(inputs: TryWrapInputs<CallbackReturn, FallbackReturn>): FallbackReturn | CallbackReturn;
export declare function wrapInTry<CallbackReturn, FallbackReturn>(callback: () => CallbackReturn, inputs: TryWrapConfig<FallbackReturn>): FallbackReturn | CallbackReturn;
export declare function executeAndReturnError<CallbackGeneric extends NoInputsFunction<PromiseLike<any>>>(callback: CallbackGeneric): Promise<Error | Awaited<ReturnType<CallbackGeneric>>>;
export declare function executeAndReturnError<CallbackGeneric extends NoInputsFunction>(callback: CallbackGeneric): Error | ReturnType<CallbackGeneric>;

@@ -38,3 +38,2 @@ export * from './augments/ansi';

export * from './augments/string/suffixes';
export * from './augments/string/url';
export * from './augments/string/uuid';

@@ -41,0 +40,0 @@ export * from './augments/time';

{
"name": "@augment-vir/common",
"version": "23.4.0",
"version": "24.0.0",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -29,3 +29,3 @@ "bugs": {

"run-time-assertions": "^1.0.0",
"type-fest": "^4.10.2"
"type-fest": "^4.12.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

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