New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@cuties/if-else

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cuties/if-else

Cutie extension for work with if-else statements.

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

cutie-if-else

NPM Version Build Status codecov

Cutie extension for work with if-else statements. It's based on the Async Tree Pattern.

Examples

You can find examples of using this library in the test directory.

Install

npm install @cuties/if-else

Run test

npm test

Run build

npm run build

Usage

const {
  If, ElseIf, Else
} = require('@cuties/if-else');

new If(
 asyncTreeThatRepresentsBooleanStatement, asyncTreeThatIsBeingInvokedIfFirstArgumentIsTrue,   
 new ElseIf(
   anotherAsyncTreeThatRepresentsBooleanStatement, 
   anotherAsyncTreeThatIsBeingInvokedIfFirstArgumentIsTrue,
   new ElseIf(..., 
    new Else(otherwiseThisAsyncTreeIsBeingInvoked)
   )
 )
).call();
Async ObjectParameters(description)Representation result
Ifstatement, action, next(ElseIf or Else)boolean value of statement
IfNotstatement, action, next(ElseIf or Else)boolean value of !statement
ElseIfstatement, action, next(ElseIf or Else)boolean value of statement
Elseactiontrue
And...statementsstatements.every(s => s)
Or...statementsstatements.some(s => s)
Not...statementsstatements.map(s => !s)

Keywords

cutie

FAQs

Package last updated on 05 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts