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

gamla

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gamla - npm Package Compare versions

Comparing version 57.0.0 to 58.0.0

4

esm/src/debug.d.ts

@@ -9,1 +9,5 @@ import { Func, ReturnTypeUnwrapped } from "./typing.js";

export declare const coerce: <T>(x: T | null | undefined) => T;
type AugmentReturnType<F extends Func, T> = (...inputs: Parameters<F>) => ReturnType<F> | T;
export declare const tryCatch: <F extends Func, T>(f: F, fallback: (e: Error, ...xs: Parameters<F>) => T) => AugmentReturnType<F, T>;
export declare const catchWithNull: <F extends Func>(f: F) => (...aruments: Parameters<F>) => ReturnType<F> | null;
export {};

@@ -76,1 +76,15 @@ import { currentLocation } from "./trace.js";

};
export const tryCatch = (f, fallback) => ((...x) => {
try {
const result = f(...x);
return result instanceof Promise
? result.catch((e) => {
return fallback(e, ...x);
})
: result;
}
catch (e) {
return fallback(e, ...x);
}
});
export const catchWithNull = (f) => tryCatch(f, () => null);

2

package.json
{
"name": "gamla",
"version": "57.0.0",
"version": "58.0.0",
"description": "Functional programming with async and type safety",

@@ -5,0 +5,0 @@ "repository": {

@@ -9,1 +9,5 @@ import { Func, ReturnTypeUnwrapped } from "./typing.js";

export declare const coerce: <T>(x: T | null | undefined) => T;
type AugmentReturnType<F extends Func, T> = (...inputs: Parameters<F>) => ReturnType<F> | T;
export declare const tryCatch: <F extends Func, T>(f: F, fallback: (e: Error, ...xs: Parameters<F>) => T) => AugmentReturnType<F, T>;
export declare const catchWithNull: <F extends Func>(f: F) => (...aruments: Parameters<F>) => ReturnType<F> | null;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerce = exports.assert = exports.timeit = exports.logBefore = exports.logAfter = exports.logAround = exports.sideLog = void 0;
exports.catchWithNull = exports.tryCatch = exports.coerce = exports.assert = exports.timeit = exports.logBefore = exports.logAfter = exports.logAround = exports.sideLog = void 0;
const trace_js_1 = require("./trace.js");

@@ -86,1 +86,17 @@ const juxt_js_1 = require("./juxt.js");

exports.coerce = coerce;
const tryCatch = (f, fallback) => ((...x) => {
try {
const result = f(...x);
return result instanceof Promise
? result.catch((e) => {
return fallback(e, ...x);
})
: result;
}
catch (e) {
return fallback(e, ...x);
}
});
exports.tryCatch = tryCatch;
const catchWithNull = (f) => (0, exports.tryCatch)(f, () => null);
exports.catchWithNull = catchWithNull;
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