arrif

v0.1.1
> An alternative implementation of the if-else statement using arrays

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

npm i arrif

Metadata

  • MIT
  • Whatever
  • Imed Adel
  • released 8/8/2019

Downloads

Maintainers