Skip to content

imedadel/arrif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArrIf

An alternative implementation of the if-else statement using arrays

Install

# npm
npm install arrif

# yarn
yarn add arrif

Usage

import arrif from 'arrif'

console.log(arrif("Si", "No", true))
//=> Si

API

arrif: (t, f, c) => any

t

Type: any Returned if condition is true

f

Type: any Returned if condition is false

c

Type: string | number | boolean | null | undefined Condition

About

An alternative to if-else statements using arrays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published