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

if-const

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

if-const - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "if-const",
"version": "1.0.0",
"version": "1.0.1",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "Executes blocks of code depending on thruthness of the value, while also making the value accessible to the block",

@@ -8,3 +8,3 @@ export type Falsy = null | undefined | false | 0 | '';

type FT<T, R> = (...args: FP<T, R>) => T | R;
type FT<T, R> = (...args: FP<T, R>) => R;

@@ -18,3 +18,3 @@ export function ifConst<T>(cond: T): {

export function ifConst<T, R>(cond: T, f?: F<T, R>, elf?: ELF<T, R>): R | undefined;
export function ifConst<T, R = never>(cond: T, ...args: FP<T, R>): T | R | undefined | FT<T, R> {
export function ifConst<T, R = never>(cond: T, ...args: FP<T, R>): R | undefined | FT<T, R> {
return args[0]

@@ -21,0 +21,0 @@ ? (cond ? args[0] : args[1])?.(cond as any)

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