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

@corentinth/chisels

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corentinth/chisels - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

12

dist/index.d.ts

@@ -114,7 +114,7 @@ /**

/**
* Safely executes a function and return a tuple with the result and an error if any.
* Safely executes an async function or promise and return a tuple with the result and an error if any.
*
* @example
* ```typescript
* const [result, error] = safely(myFunction);
* const [result, error] = await safely(myFunction);
*

@@ -128,9 +128,9 @@ * if (error) {

*/
declare function safelySync<T>(fn: () => T): [T, null] | [null, Error];
declare function safely<T>(fn: (() => Promise<T> | T) | Promise<T>): Promise<[T, null] | [null, Error]>;
/**
* Safely executes an async function or promise and return a tuple with the result and an error if any.
* Safely executes a function and return a tuple with the result and an error if any.
*
* @example
* ```typescript
* const [result, error] = await safely(myFunction);
* const [result, error] = safelySync(myFunction);
*

@@ -144,4 +144,4 @@ * if (error) {

*/
declare function safely<T>(fn: (() => Promise<T> | T) | Promise<T>): Promise<[T, null] | [null, Error]>;
declare function safelySync<T>(fn: () => T): [T, null] | [null, Error];
export { type DeepPartial, type Dictionary, type Expand, type PartialBy, type Subtract, castError, formatBytes, injectArguments, safely, safelySync };
{
"name": "@corentinth/chisels",
"type": "module",
"version": "1.0.3",
"version": "1.0.4",
"packageManager": "pnpm@9.9.0",

@@ -6,0 +6,0 @@ "description": "Collection of utilities for JavaScript and TypeScript, lightweight and tree-shakable.",

@@ -75,3 +75,3 @@ # Chisels - JS/TS utilities and types

Function - [See source](./src/safely.ts#L20)
Function - [See source](./src/safely.ts#L43)

@@ -82,3 +82,3 @@ Safely executes a function and return a tuple with the result and an error if any.

```typescript
const [result, error] = safely(myFunction);
const [result, error] = safelySync(myFunction);

@@ -94,3 +94,3 @@ if (error) {

Function - [See source](./src/safely.ts#L42)
Function - [See source](./src/safely.ts#L20)

@@ -97,0 +97,0 @@ Safely executes an async function or promise and return a tuple with the result and an error if any.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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