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.1 to 1.0.2

2

package.json
{
"name": "if-const",
"version": "1.0.1",
"version": "1.0.2",
"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>) => R;
type FT<T, R> = (...args: FP<T, R>) => R | undefined;

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

? (cond ? args[0] : args[1])?.(cond as any)
: (f, elf) => ifConst<T, R>(cond, f as any, elf as any);
: (f, elf) => ifConst(cond, f, elf);
}

@@ -29,5 +29,5 @@

export function constIf<T, R>(f: F<T, R>, elf: ELF<T, R>): (cond: T) => R;
export function constIf<T, R>(f: F<T, R>, elf?: ELF<T, R>): (cond: T) => R;
export function constIf<T, R>(f: F<T, R>, elf?: ELF<T, R>): (cond: T) => R {
return cond => ifConst(cond, f, elf as any);
export function constIf<T, R>(f: F<T, R>, elf?: ELF<T, R>): (cond: T) => R | undefined;
export function constIf<T, R>(f: F<T, R>, elf?: ELF<T, R>): (cond: T) => R | undefined {
return cond => ifConst(cond, f, elf);
}

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